passing info from facebook to UITabBarController
- by EquinoX
When my app first start, it shows up a main page showing to login to facebook and then it goes to the UITabBarController. The code that I have in my app delegate is the following:
//this is the .h
@interface NMeAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
MainViewController *controller;
UITabBarController *tabBar;
}
@property (nonatomic, retain) IBOutlet UITabBarController *tabBar;
@property (nonatomic, retain) MainViewController *controller;
@property (nonatomic, retain) IBOutlet UIWindow *window;
@end
//this is the .m of the app delegate
#import "NMeAppDelegate.h"
@implementation NMeAppDelegate
@synthesize window;
@synthesize tabBar;
@synthesize controller;
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
controller = [[MainViewController alloc] init];
[window addSubview:tabBar.view];
[window addSubview:controller.view];
[window makeKeyAndVisible];
return YES;
}
Inside of MainViewController, I actually have a Facebook * facebook object, which basically has all of the information that I need. Every information that I need for this apps is queried in the MainViewController. The problem is that after getting this info and now I am in the UITabViewController... how do I get those information that I already queried facebook for? I have a class called UserInfo as well, which basically has everything essential I need. I need to have the info from UserInfo so that the other ViewController in the UITabBarController have access to it.... I hope my question makes sense