ios - 'BMPhotosViewController' 没有可见的@interface 声明选择器'initWithPhoto:'
问题描述
我正进入(状态:
'BMPhotosViewController' 没有可见的@interface 声明选择器'initWithPhoto:'
代码:
if (image) {
dispatch_async(dispatch_get_main_queue(), ^{
BMPhotosViewController * photosVC = [[BMPhotosViewController alloc] initWithPhoto:@[[BMPhotoFullImage PhotoImageWithImage:image]]];
[self.presentationViewController presentViewController:photosVC animated:YES completion:nil];
});
}
有什么建议么?
解决方案
如果 BMPhotosViewController 来自 pod 文件,请检查 init 方法是否在其头文件中公开可用,否则如果是您自己的 ViewController,只需在 header 的接口中声明自定义 init 方法。
-(实例类型)initWithPhoto:(NSArray *)照片;
推荐阅读
- python - 如何将数据折叠成最少的列?
- visual-studio-code - 如何将包含“+”号的键绑定添加到扩展?
- javascript - MediaStreamAudioDestinationNode 始终为 Stereo;忽略 AudioNodeOptions
- css - 在overflow-x auto中将子级扩展到父级的全宽
- python - PySide 当我在主窗口中显示对话框时,它会中断我的工作线程
- reactjs - 'MouseEvent 类型的参数
' 不能分配给类型为 'number' 的参数 - javascript - 从 HTML 读取文件输入并实际保存以通过电子邮件发送
- python - csv文件天蓝色数据块的导入错误
- ng-zorro-antd - 使日期选择器在“年”之前显示“月”(可能吗?)
- reactjs - useRef 中函数的初始值引发错误,原因是“'() => never' 类型的参数不可分配给 'T' 类型的参数。”