Does a UISplitViewController's master view always have to be a UITableView?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 04:09:58

问题


I've used UISplitViewController several times before without problems (well, problems that I've fixed anyway ;-) However, I have always previously used a UITableView as the master view, as that's the obvious choice. Today I have need for something a little different, so I'm just providing a UIView.

However, I'm getting the exception,

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UITableViewController loadView] loaded the "MyViewController" nib but didn't get a UITableView.'

I can't find mention in the Apple documentation that the master view must always be a UITableView in the documentation, there's just a reference to the master view being used to display a list.

Is there a rule that the master view must always be a UITableView?


回答1:


No, it doesn't.

I'd made a mistake by changing the code for the iPad idiom, but testing on an iPhone - whoops!



来源:https://stackoverflow.com/questions/12077075/does-a-uisplitviewcontrollers-master-view-always-have-to-be-a-uitableview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!