Question

I am currently passing the userId property to the tab controller, which wraps three tabs, but how do I access the userId in each of the view controllers?

I tried [self.tabBarController userIds] but userIds does not work and errors...

Here is the tab controller .h file

#import <UIKit/UIKit.h>

@interface TrekTabController : UITabBarController {
    NSString *userProfileId, *userProfileName;
}

@property (nonatomic, retain) NSString * userProfileId;
@property (nonatomic, retain) NSString * userProfileName;

@end
Was it helpful?

Solution

Did you add TrekTabController.h in the view controller implementations of the view controllers which are shown in the tabs? If so, try to add casting: [(TrekTabController*)self.tabBarController userIds].

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top