使用 MGSplitViewController,如何更改细节 View Controller ? 声明了一个属性:
@property (nonatomic, retain) IBOutlet UIViewController *detailViewController; // convenience.
执行 splitVC.detailViewController = myVC;
没有效果。相反,我必须执行 splitVC.viewControllers = @[masterVC, myVC];
。
它有效,但这是正确的方法吗?
谢谢!
最佳答案
你做得对。来自 UISplitViewController引用:
The split view controller has no significant interface of its own. Its job is to manage the presentation of its two child view controllers and transitions between different orientations.
还有:
You must assign two view controllers to a split view controller. Usually you configure these view controllers in a storyboard; if you create a split view controller programmatically, you assign them using the viewControllers property.
关于objective-c - MGSplitViewController 更改详细 View Controller ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12229351/