开发者

How can I assign properties correctly?

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜