【发布时间】:2013-09-20 23:39:03
【问题描述】:
由于 UISplitViewController 需要成为 rootviewcontroller,因此我尝试在应用启动时以模态方式呈现一个 viewcontroller,以充当用户的登录/欢迎屏幕。显然,我的 AppDelegate.m 中的以下代码应该可以使用 IOS 6:
#import "AppDelegate.h"
#import "WelcomeViewController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
WelcomeViewController *modalWelcomeView = [[WelcomeViewController alloc] initWithNibName:@"Welcome" bundle:nil];
[modalWelcomeView setModalPresentationStyle:UIModalPresentationFullScreen];
[self.splitViewController presentViewController:modalWelcomeView animated:NO Completion:nil];
return YES;
}
然而,对于return YES; 上面的行,我得到一个“在'AppDelegate' 类型的对象上找不到属性'splitViewController'”。我怕我在做傻事……
有什么建议吗?非常感谢。
【问题讨论】:
标签: ios ipad ios6 uisplitviewcontroller modalviewcontroller