- (UIView *)customLoadingViewWithAppInfo:(TMFMiniAppInfo *)appInfo frame:(CGRect)frame {UIView *view = [[UIView alloc] initWithFrame:frame];//todo: Set specific view-related contentreturn view;}
Key | Description |
TMA_SK_MINIAPP_CloseButton | Close Button Icon |
TMA_SK_MINIAPP_CloseButtonDark | Close Button Icon in dark theme |
TMA_SK_MINIAPP_HomeButton | Home Button Icon |
TMA_SK_MINIAPP_HomeButtonDark | Home Button Icon in dark theme |
TMA_SK_MINIAPP_BackButton | Return Button Icon |
TMA_SK_MINIAPP_BackButtonDark | Return Button Icon in dark theme |
TMA_SK_MINIAPP_MoreButton | More Button Icon |
TMA_SK_MINIAPP_MoreButtonDark | More Button Icon in dark theme |
TMA_SK_MINIAPP_RecordButton | Recording Button Icon |
TMA_SK_MINIAPP_RecordButtonDark | Recording Button Icon in dark theme |
TMA_SK_MINIAPP_MoreBackground | Capsule Section's Background Image |
TMA_SK_MINIAPP_MoreBackgroundDark | Capsule Section's Background Image in dark theme |
- (NSString *)stringWithConfigKey:(NSString *)key {// Set the close button for light modeif([key isEqualToString:TMA_SK_MINIAPP_CloseButton]) {return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"white_close-circle.png"];} else if([key isEqualToString:TMA_SK_MINIAPP_CloseButtonDark]) {return [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"dark_close-circle.png"];}return nil;}
- (NSArray<TMASheetItemInfo *> *)customizedConfigForShare {NSMutableArray *arrays = [[NSMutableArray alloc] init];TMASheetItemInfo *item1 = [[TMASheetItemInfo alloc] initWithTitle:@"More sharing" type:MAUIDelegateShareViewTypeCustomizedShare shareTarget:100 shareKey:@"my"];item1.icon = [UIImage imageNamed:@"icon_moreOperation_shareChat"];[arrays addObject:item1];TMASheetItemInfo *item2 = [[TMASheetItemInfo alloc] initWithTitle:@"click" type:MAUIDelegateShareViewTypeCustomizedAction action:^(TMASheetActionParams * _Nullable params) {NSLog(@"click");}];item2.icon = [UIImage imageNamed:@"icon_moreOperation_collect"];[arrays addObject:item2];return arrays;}
/// Share Panel/// If this method is not implemented, "showActionSheetWithTitle:cancelButtonTitle:cancelAction:otherButtonTitleAndActions:dismissBlock:presentingViewController:" will be called./// @param title: Title/// @param cancelAction: Cancel operation/// @param otherButtonTitleAndActions: Other buttons and corresponding actions/// @param dismissBlock: Actions to be executed after the panel is dismissed (must be called to ensure correct functionality.)/// @param parentVC: ViewController initiating the panel- (void)showShareViewWithTitle:(nullable NSString *)titlecancelAction:(nullable dispatch_block_t)cancelActionotherButtonTitleAndActions:(nullable NSArray *)otherButtonTitleAndActionsdismissBlock:(nullable dispatch_block_t)dismissBlockparentVC:(UIViewController *)parentVC;
// Set the transition animation at the start of the Mini Program to "Enter from Bottom, Exit from Top".- (TMFSlideAnimationType)getTMFSlideAnimationType{return TMFSlideAnimationTypeBottomToTop;}
/*** @brief Create a Custom Authorization Window** @param frame Window Size* @param scope Refer to WeChat Authorization Scope* @param title Permission Name* @param desc Permission Description Information* @param privacyApi The API Currently Being Called* @param appInfo Current mini-program information* @param allowBlock Allow callback* @param denyBlock Denial callback*/- (UIView *)createAuthorizeAlertViewWithFrame:(CGRect)framescope:(NSString *)scopetitle:(NSString *)titledesc:(NSString *)descprivacyApi:(NSString *)privacyApiappInfo:(TMFMiniAppInfo *_Nullable)appInfoallowBlock:(void (^)(void))allowBlockdenyBlock:(void (^)(void))denyBlock;
Mini Program API | TMFMiniAppSDKDelegate Method |
wx.showLoading |
|
wx.hideLoading |
|
wx.showToast |
|
wx.hideToast |
|
wx.showActionSheet | - |
wx.showModal |
|
Was this page helpful?