首页 > 解决方案 > '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];
    });
}

有什么建议么?

标签: iosobjective-cselector

解决方案


如果 BMPhotosViewController 来自 pod 文件,请检查 init 方法是否在其头文件中公开可用,否则如果是您自己的 ViewController,只需在 header 的接口中声明自定义 init 方法。

-(实例类型)initWithPhoto:(NSArray *)照片;


推荐阅读