如何更改拆分视图控制器项目的宽度大小(主视图控制器 - 详细信息视图控制器)?

时间:2015-09-01 21:13:13

标签: ios swift ipad uisplitviewcontroller uicontainerview

我需要在Split View Controller中更改View Controllers的宽度大小。我的意思是第一个视图控制器的默认值是320.第二个是703.我需要用605和419更改它们.Btw项目是iPad - Landscape项目。有没有办法做到这一点?

1 个答案:

答案 0 :(得分:8)

The class UISplitViewController exposes a property to change the width of the master view. This property is preferredPrimaryColumnWidthFraction with which you can specify the width of the master view as a percentage respect the total width of the split view.