views:

34

answers:

1

I have a UITabBarController that I would like to assign to another object, so 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?

+1  A: 

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?

walkytalky
I assigned it before the tabbarcontroller was even alloc/init. thanks for the oversight. sometimes we overlook the simple things :p
Sheehan Alam