내 앱이 처음 시작될 때 Facebook에 로그인 할 기본 페이지가 표시됩니다. 그런 다음 UITabBarController
으로 이동합니다.Facebook에서 UITabBarController로 정보 전달
MainViewController
의 내부
//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;
}
, 실제로 나는 UITabBarController가 필요한 모든 정보를 가지고있는 사용자 정보 객체를 가지고 : 내 애플 대리자에있는 코드는 다음과 같다. 문제는 UITabViewController
에서이 정보를 얻은 후이 UserInfo를 UITabBarController에 전달하거나 UITabBarController 내부에있는 ViewController가이 UserInfo에 액세스 할 수 있도록 할 수 있습니까? 이 작업을 수행하는 방법?
제 질문에 도움이 되었기를 바랍니다.
나는 당신이 바라는 것이지나 가지 않을까 두려워합니다. 당신의 질문은 이해가 가지 않습니다 :) 당신이 달성하려고 노력하고있는 것과 무엇이 일어나고 있는지 분명하게 기술하십시오. –
질문을 약간 수정했습니다. 도움이 되었기를 바랍니다. 내 손가락을 엇갈리게합니다. – aherlambang