reason: '-[SSShareActionSheetCustomItem integerValue]: unrecognized selector sent to instance 0x7fc6

简介:

ShareSDK自定义分享菜单时,出现了这个问题:

reason: '-[SSShareActionSheetCustomItem integerValue]: unrecognized selector sent to instance 0x7fc661d902f0'


原因是使用的是自定义的分享菜单,是不应该传一健分享数组的:

  // 如果是使用一键分享,则需要传oneKeyShareList参数,
  // 如果使用的是自定义的分享菜单,则这个参数需要设置为nil,
  // 否则会出现
  id<ISSShareOptions> shareOptions = [ShareSDK defaultShareOptionsWithTitle:@"分享信息"
                                                            oneKeyShareList:shareList
                                                             qqButtonHidden:NO
                                                      wxSessionButtonHidden:NO
                                                     wxTimelineButtonHidden:NO
                                                       showKeyboardOnAppear:YES
                                                          shareViewDelegate:nil
                                                        friendsViewDelegate:nil
                                                      picViewerViewDelegate:nil];

把oneKeyShareList参数设置为nil:

  // 如果是使用一键分享,则需要传oneKeyShareList参数,
  // 如果使用的是自定义的分享菜单,则这个参数需要设置为nil,
  // 否则会出现
  id<ISSShareOptions> shareOptions = [ShareSDK defaultShareOptionsWithTitle:@"分享信息"
                                                            oneKeyShareList:nil
                                                             qqButtonHidden:NO
                                                      wxSessionButtonHidden:NO
                                                     wxTimelineButtonHidden:NO
                                                       showKeyboardOnAppear:YES
                                                          shareViewDelegate:nil
                                                        friendsViewDelegate:nil
                                                      picViewerViewDelegate:nil];

这样就解决了!
目录
相关文章
|
Docker 容器
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
2828 0
解决failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status co
|
7月前
network is not ready: runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady me
network is not ready: runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady me
234 1
|
4月前
|
开发工具 git
Stylelint——Unexpected unknown pseudo-class selector ":deep" selector-pseudo-class-no-unknown
新项目制定规范接入了stylelint,并通过husky在git提交时去触发检测修复,使用`:deep()`的时候却发现了报错;
145 1
|
7月前
|
Java
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code
121 0
|
7月前
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
Error:Execution failed for task ':app:javaPreCompileDebug'. > Annotation processors must be explicit
95 0
|
索引
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
371 0
ES报错:“type“=>“cluster_block_exception“, “reason“=>“blocked by: [FORBIDDEN/12/index read-only / allow
unrecognized selector sent to instance的一类解决办法
unrecognized selector sent to instance的一类解决办法
151 0