Change the width of Master in UISplitViewController

前端 未结 16 1715
自闭症患者
自闭症患者 2020-11-28 05:55

The iPad programming guide says that the splitView\'s left pane is fixed to 320 points. But 320 pixels for my master view controller is too much. I would like to reduce it a

16条回答
  •  执笔经年
    2020-11-28 06:57

    iOS 8 introduced a new property:

    // An animatable property that can be used to adjust the maximum absolute width of the primary view controller in the split view controller.
    @property(nonatomic, assign) CGFloat maximumPrimaryColumnWidth NS_AVAILABLE_IOS(8_0); // default: UISplitViewControllerAutomaticDimension
    

    Use this property to adjust your master viewcontroller to your desired width.

提交回复
热议问题