【发布时间】:2017-10-23 08:44:59
【问题描述】:
我使用的是 xib 而不是 storyBord。 问题是当我想更改应用程序上的窗口时。 我可以加载下一个窗口,但我不能用 pushViewController 显示它,我通知你在更新 Xcode 之前它已经工作了。
感谢您的回复
按钮点击方法:
`MesFic *vueMesFic=[[MesFic alloc] initWithNibName:@"MesFic" bundle:[NSBundle mainBundle]];
[self.navigationController pushViewController:vueMesFic animated:YES];
[vueMesFic release];
vueMesFic=nil;`
我的 appDelegate.m
MyStyleSheet * myStyleSheetInstance = [[MyStyleSheet alloc] init];
[TTStyleSheet setGlobalStyleSheet:myStyleSheetInstance];
[myStyleSheetInstance release];
// Override point for customization after application launch.
//[self.window addSubview:[navigationController view]];
[self.window makeKeyAndVisible];
[window setRootViewController:navigationController];
return YES;
【问题讨论】:
-
我确定,你在这里遇到了错误
[vueMesFic release]; -
加入主队列。
-
确保应用程序窗口有navigationController。
-
self.navigationController为零吗?你在vueMesFic=nil;之后做吗? -
No
self.navigationController不是 nil
标签: ios objective-c xib xcode9