UISplitArrangementViewProperties
Properties you use to customize how a split arrangement presents a view.
Declaration
@interface UISplitArrangementViewProperties : NSObjectOverview
By default, a split arrangement sizes the primary and secondary views equally when a display has one region. Influence how the arrangement view computes the sizes for each view by setting the split arrangement’s view properties for each placement to use an automatic size, a fixed layout size, a fractional layout size, or an intrinsic content size.
First create a UISplitArrangement instance and a UISplitArrangementViewProperties instance to configure the preferred size:
UISplitArrangement *splitArrangement = [UISplitArrangement splitArrangement];
UISplitArrangementViewProperties *primaryViewProperties = [splitArrangement.defaultViewProperties copy];Next, create a UISplitArrangementDimensionRange instance, and configure the minimum, preferred, or maximum properties with UISplitArrangementDimension options to describe how to size the view. The following example sets a preferred fractional layout size with an absolute minimum:
UISplitArrangementDimensionRange *primaryDimensionRange = [[UISplitArrangementDimensionRange alloc] init];
primaryDimensionRange.minimum = [UISplitArrangementDimension absoluteDimension:250.0];
primaryDimensionRange.preferred = [UISplitArrangementDimension fractionalDimension:0.3];Then, set the width or height property on the view properties instance to the configured UISplitArrangementDimensionRange, set the view properties on the split arrangement for the view’s placement, and update the arrangement view controller to use the split arrangement by calling the updateArrangement:animated: method:
primaryViewProperties.width = primaryDimensionRange;
[splitArrangement setViewProperties:primaryViewProperties forPlacement:UIArrangementViewControllerViewPlacementPrimary];
[arrangementVC updateArrangement:splitArrangement];