@@ -14,11 +14,14 @@ This example implement the PinLayout's Intro example using objective-c
1414```
1515- (void) layoutSubviews {
1616 [super layoutSubviews];
17-
18- [[[[[[logo.pinObjc top] left] width:100] aspectRatio] marginWithTop:topLayoutGuide + 10 horizontal:10 bottom:10] layout];
19- [[[[segmented.pinObjc rightOf:logo aligned:VerticalAlignTop] right] marginHorizontal:10] layout];
20- [[[[[[textLabel.pinObjc belowOf:segmented aligned:HorizontalAlignLeft] widthOf:segmented] pinEdges] marginTop:10] fitSize] layout];
21- [[[[[separatorView.pinObjc belowOfViews:@[logo, textLabel] aligned:HorizontalAlignLeft] rightTo:segmented.edge.right] height:1] marginTop:10] layout];
17+
18+ CGFloat margin = 10;
19+ UIEdgeInsets safeArea = self.pinObjc.safeArea;
20+
21+ logo.pinObjc.topInsets(safeArea).leftInsets(safeArea).width(100).aspectRatio().margin(margin).layout();
22+ segmented.pinObjc.rightOfAligned(logo, VerticalAlignTop).rightInsets(safeArea).marginHorizontal(margin).layout();
23+ textLabel.pinObjc.belowOfAligned(segmented, HorizontalAlignLeft).widthOf(segmented).pinEdges().marginTop(margin).sizeToFitType(FitWidth).layout();
24+ separatorView.pinObjc.belowOfViewsAligned(@[logo, textLabel], HorizontalAlignLeft).rightToEdge(segmented.edge.right).height(1).marginTop(margin).layout();
2225}
2326
2427```
@@ -31,7 +34,7 @@ This example implement the PinLayout's Intro example using objective-c
3134The PinLayout's objective-c interface is available using the property ` pinObjc ` (instead of ` pin ` in Swift)
3235
3336```
34- [[ view.pinObjc top] layout] ;
37+ view.pinObjc. top(). layout() ;
3538```
3639
3740#### ` layout() `
@@ -47,6 +50,6 @@ When using the Objective-c interface, the `layout` method must be called explici
4750 view.pin.width(100)
4851
4952 // Objective-c
50- [[ view.pinObjc width:100] layout] ;
53+ view.pinObjc. width(). layout() ;
5154```
5255
0 commit comments