TabController里面的iOS MasterDetail应用程序 - 从哪里开始? [英] iOS MasterDetail app inside TabController - where to start?

查看:83
本文介绍了TabController里面的iOS MasterDetail应用程序 - 从哪里开始?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里真的很基本的问题:

Really basic question here:

我想构建一个具有大量MasterDetail视图的应用程序,可以从TabView访问。

I want to build an app that has a bunch of MasterDetail views that can be accessed from a TabView.

我想从MasterDetail项目模板开始,但如果我这样做并将一个TabController扔到故事板的前面,我就会崩溃。

I'd like to start with the MasterDetail project template, but if I do that and toss a TabController onto the front of the storyboard, I get a crash.

2012-04-08 12:51:21.205 SMToolkit[22630:fb03] -[UISplitViewController topViewController]:   unrecognized selector sent to instance 0x82491c0
2012-04-08 12:51:21.208 SMToolkit[22630:fb03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UISplitViewController topViewController]: unrecognized selector sent to instance 0x82491c0'
*** First throw call stack:
(0x16ad022 0x183ecd6 0x16aecbd 0x1613ed0 0x1613cb2 0x2bf9 0x16386 0x17274 0x26183 0x26c38 0x1a634 0x1597ef5 0x1681195 0x15e5ff2 0x15e48da 0x15e3d84 0x15e3c9b 0x16c65 0x18626 0x2a6d 0x29d5)
terminate called throwing an exception(lldb) 

到目前为止我所做的一切都在故事板上(字面意思是我做了一个新的MasterDetail项目,然后进入故事板并在它前面放置一个tabcontroller)

All I've done so far is in the storyboard (literally I made a new MasterDetail project, then went into the storyboard and put a tabcontroller in front of it)

推荐答案

简单的答案就是为你提供的模板大师细节包括一些你可能不想要的代码。

Simple answer is that the template provided for you in Master Detail includes some code you probably don't want.

在AppDelegate.m中查找以下方法,只需使用返回YES;

In AppDelegate.m look for the following method and simply have it return YES;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // Override point for customization after application launch.
    return YES;
}

这篇关于TabController里面的iOS MasterDetail应用程序 - 从哪里开始?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆