initWithNibname 메서드의 nibName이 무엇인지 알고 싶습니다. AppDelegate.m의 (NSString *) nibName은 무엇입니까?"AppDelegate -> rootViewController = initWithNibName (NSString *) nibName"에서 nibName을 얻는 방법과 방법.
어떻게 작동합니까?
내가 원하는 ViewController의 viewDidLoad 메소드에 rootViewController가 있어야 할 필요가있는 것은 무엇입니까?
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_tonten = [[TontenViewController alloc] init];
//- I'm not sure about this either.
self.window.rootViewController = [[TontenViewController alloc] initWithNibName:@"tontenViewController" bundle:nil];
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
감사합니다.
여러분의 펜촉 이름은'TontenViewController'라고 생각합니다. 펜촉 이름의 대소 문자 구분을 확인하십시오. – Mani