【发布时间】:2012-07-25 05:43:53
【问题描述】:
我正在使用情节提要,我需要使用子视图来导入 xib。 xib 只是显示图像。它有一个 UIImageView 和一个 UIBarButtonItem。将图像作为子视图导入后如何设置?
我尝试在 h+m 文件中为子视图 xib 设置方法,但也许我做错了。这是我的代码
-(void)showPreviewImageScreen:(UIImage *)image
{
UIStoryboard* sb = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
UIViewController* vc = [sb instantiateViewControllerWithIdentifier:@"libraryImagePreview"];
[vc setPreviewImage:image];
[self.navigationController.view addSubview:vc.view];
}
我得到的错误是“UIViewController 没有可见的@interface 声明选择器'setPreviewImage'”
【问题讨论】:
标签: iphone objective-c xcode ios5