문제

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
도움이 되었습니까?

해결책

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].

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top