I have a UITabBarController that I would like to assign to another object, 开发者_StackOverflowso that that object can control it:
watchListView.tabBarController = self.stTabBarController;
During this assignment the value of both self.stTabBarController
and watchListView.tabBarController
are 0x0.
How can I assign the UITabBarController's?
The assignment is (at least syntactically) correct. The problem is that you're doing at a time when the source property has itself not been set.
Without knowing more about when and where this is happening it's difficult to guess what the problem is. At what point are you trying to make this call? Does the controller ever exist? Is there some subsequent time where the property is demonstrably non-nil
?
精彩评论