Closed TimothyChilvers closed 8 years ago
Thanks for the pull request! 💖
Would you mind adding some tests that also exercise the new API?
Where's this at? Would love to see this in my favourite AutoLayout library :)
I've been using it for months now and it's been fine, I'd like to add the tests and change the names to match styles that have been discussed elsewhere…. But I haven't done it. I'll see if I can do that by the end of the week.
great! Can't wait! :)
@TimothyChilvers this looks good 👍 - it's worth trying to get this tested and merged
All right, all right… I'll pick it up again now.
Is my approach preferred over #212 ?
@robb that opinion is on you I'm afraid ^
I added tests, but I'm not happy with them. The reason being I can't make the UILayoutGuide of the view controller have a non-zero length just using UIKit components straight off. I only spent an hour or so fiddling with it, so I might have missed something. I have another branch which stubs the view controller and layout guide classes, but the compiler warnings for availability are a nightmare.
If the tests are adequate (In my mind they're not the greatest), feel free to merge. If someone wants to have a go at populating the layout guide with a length, also be my guest. I'll put some time aside on Monday if no further action has been taken.
So…
Having tried subclassing UIViewController and giving custom UILayoutGuide subclasses to the guides and failed, and failing to populate the UIKit supplied top and bottom layoutGuide objects with properties, and finally with UILayoutSupport not being equatable / internal behaviour and constraint generation being unreliable, I'm calling this as the limit of what I can achieve with the tests.
Alright, given the comprehensive docs / tests on this PR, I'm gonna merge it tomorrow unless I hear a good to not
Hah - nice. OK, let's get this in.
Hope you don't mind my taking a stab at this. It's based on the examples in https://github.com/robb/Cartography/issues/95 and admittedly it doesn't quite match the framework pattern, but it's here if you want it.