我在试图推翻
- (void)makeWindowControllers;这是它的代码:
NSStoryboard* const storyboard = [NSStoryboard storyboardWithName:@"Main" bundle:nil];
NSWindowController* const windowController = [storyboard instantiateControllerWithIdentifier:@"Document Window Controller"];然后,我想向ViewController添加一个用户通过Swift中的open...选择的图像,我只想这样做:
(windowController.contentViewController as? ViewController)?.imageView?.image = openedImage我怎么能在目标-C中做这件事呢?我真的很困惑,因为我没有做太多的类型转换,而我正在学习C。谢谢。
发布于 2018-10-27 10:07:21
[[((ViewController *)[windowController contentViewController]) imageView] setImage: openedImage];https://stackoverflow.com/questions/53020655
复制相似问题