- (UIView *)customLoadingViewWithAppInfo:(TMFMiniAppInfo *)appInfo frame:(CGRect)frame {UIView *view = [[UIView alloc] initWithFrame:frame];//todo 设置具体的 view 相关内容return view;}
Key | 描述 |
TMA_SK_MINIAPP_CloseButton | 关闭按钮 icon |
TMA_SK_MINIAPP_CloseButtonDark | 关闭按钮 icon 深色主题 |
TMA_SK_MINIAPP_HomeButton | 主页按钮 icon |
TMA_SK_MINIAPP_HomeButtonDark | 主页按钮 icon 深色主题 |
TMA_SK_MINIAPP_BackButton | 返回按钮 icon |
TMA_SK_MINIAPP_BackButtonDark | 返回按钮 icon 深色主题 |
TMA_SK_MINIAPP_MoreButton | 更多按钮 icon |
TMA_SK_MINIAPP_MoreButtonDark | 更多按钮 icon 深色主题 |
TMA_SK_MINIAPP_RecordButton | 录音按钮 icon |
TMA_SK_MINIAPP_RecordButtonDark | 录音按钮 icon 深色主题 |
TMA_SK_MINIAPP_MoreBackground | 胶囊部分背景图片 |
TMA_SK_MINIAPP_MoreBackgroundDark | 胶囊部分背景图片深色主题 |
- (NSString *)stringWithConfigKey:(NSString *)key {//设置浅色模式下的关闭按钮if([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;}
/// 分享面板/// 如果此方法不实现,则会调用showActionSheetWithTitle:cancelButtonTitle:cancelAction:otherButtonTitleAndActions:dismissBlock:presentingViewController:/// @param title 标题/// @param cancelAction 取消操作/// @param otherButtonTitleAndActions 其他按钮及响应操作/// @param dismissBlock 面板收起后需要执行的操作(一定要调用以保证功能正确!!!)/// @param parentVC 呼起面板的vc- (void)showShareViewWithTitle:(nullable NSString *)titlecancelAction:(nullable dispatch_block_t)cancelActionotherButtonTitleAndActions:(nullable NSArray *)otherButtonTitleAndActionsdismissBlock:(nullable dispatch_block_t)dismissBlockparentVC:(UIViewController *)parentVC;
// 设置小程序启动时转场动画为下进上出- (TMFSlideAnimationType)getTMFSlideAnimationType{return TMFSlideAnimationTypeBottomToTop;}
/*** @brief 创建自定义的授权窗口** @param frame 窗口大小* @param scope 参考微信授权 scope* @param title 权限名称* @param desc 权限描述信息* @param privacyApi 当前调用的api* @param appInfo 当前小程序信息* @param allowBlock 允许回调* @param denyBlock 拒绝回调*/- (UIView *)createAuthorizeAlertViewWithFrame:(CGRect)framescope:(NSString *)scopetitle:(NSString *)titledesc:(NSString *)descprivacyApi:(NSString *)privacyApiappInfo:(TMFMiniAppInfo *_Nullable)appInfoallowBlock:(void (^)(void))allowBlockdenyBlock:(void (^)(void))denyBlock;
小程序 api | TMFMiniAppSDKDelegate 方法 |
wx.showLoading |
|
wx.hideLoading |
|
wx.showToast |
|
wx.hideToast |
|
wx.showActionSheet | - |
wx.showModal |
|
本页内容是否解决了您的问题?