【发布时间】:2014-06-06 21:33:24
【问题描述】:
据我所知,当我打开 AppDelegate.m 文件时,它应该包含与此类似的代码。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.
self.viewController = [[ViewController alloc] initWithNibName:@"ViewController"
bundle:nil];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return yes;
但是当我打开我的时候,里面只有评论和
return yes;
此外,当我手动输入所有代码时,它会告诉我 self.viewController 行在“AppDelegate *”类型的对象上找不到属性“viewController”,并且还针对下一个 self 实例在其下方的 2 行.viewController.
为什么会发生这种情况,我该如何解决?
【问题讨论】:
标签: ios methods appdelegate