Change Objective-C API to chained call#229
Conversation
lucdion
left a comment
There was a problem hiding this comment.
Wow, really nice, I always wanted to support that, but never took the time to do it. Really nice job 👌👌👌
One tine comment + could you update the documentation (docs/objective_c.md)
Thanks
| // [[[[segmented.pinObjc rightOf:logo aligned:VerticalAlignTop] rightWithInsets:safeArea] marginHorizontal:margin] layout]; | ||
| // [[[[[[textLabel.pinObjc belowOf:segmented aligned:HorizontalAlignLeft] widthOf:segmented] pinEdges] marginTop:margin] sizeToFit:FitWidth] layout]; | ||
| // [[[[[separatorView.pinObjc belowOfViews:@[logo, textLabel] aligned:HorizontalAlignLeft] rightTo:segmented.edge.right] height:1] marginTop:margin] layout]; | ||
| logo.pinObjc |
There was a problem hiding this comment.
Could you put this on a single line, so that it matches Swift style?
|
合并好了吗,大佬 |
|
@protosse, you need to fix the compilation of the objective-c unit tests ( |
lucdion
left a comment
There was a problem hiding this comment.
You just need to fix unit tests + this little doc change
docs/objective_c.md
Outdated
|
|
||
| // Objective-c | ||
| [[view.pinObjc width:100] layout]; | ||
| view.pinObjc.width().layout(); |
There was a problem hiding this comment.
| view.pinObjc.width().layout(); | |
| view.pinObjc.width(100).layout(); |
|
@lucdion hello, i have fixed all the compilation of the objective-c unit tests, except the code in the carthage directory, it will use the PinLayout from github, so can i comment them? |
|
@protosse yes its fine for carthage. You should alse update your branch with the latest master, I have update to project to Xcode 12.5 and fix the build scripts. |
|
I have published this new release https://github.com/layoutBox/PinLayout/releases/tag/1.10.0 that includes this PR. |


I have always used PinLayout with Swift before, but lately i have to begin a project with Objective-C.
Too many brackets are really a nightmare.