I have a custom UIWindow class that has an IBOutlet
@interface MyWindow
IBOutlet UIView * someView;
id <MyWindowDelegate> delegate;
// to inform a controller something happened to view
开发者_StackOverflow中文版@end
@interface MyControllerThatContainsSomeView
IBOutlet UIWebView * theConcreteView;
@end
I have changed my Window in MainWindow.xib to MyWindow. Is there a way, through interface builder, in which I can reference someView from MyControllerThatContainsSomeView.xib
so, MainWindow.MyWindow.someView -> MyControllerThatContainsSomeView.theConcreteView
You can refer to it in a binding path but that's about it. Usually when you find that you need to refer from one view to another, it's time to rethink your design. Views should refer instead to model objects which provide data to the views.
精彩评论