marcosgriselli / EasyTransitions

A simple way to create custom interactive UIViewController transitions
MIT License
1.68k stars 92 forks source link

Made the demo "universal" #13

Closed Julioacarrettoni closed 6 years ago

Julioacarrettoni commented 6 years ago
marcosgriselli commented 6 years ago

Don't worry about NSEdgeLayoutConstraints that was just created for when we need to create and modify all the edge constraints later. We can have a UIView extension method edgesTo(_ view: UIView) that creates constraints without the need to hold the reference (like in the blur view for example).

marcosgriselli commented 6 years ago

I'm having a layout issue after rotation, portrait single column cells take the entire screen width. Launch in portrait rotate to landscape and back to portrait but just on iPhone X 🤔.

Julioacarrettoni commented 6 years ago

Regarding NSEdgeLayoutConstraints I added the convenience init that sets the recr to zero (turning all constants to zero) I originally intended to call do init(view:container:).setActive(true) so I didn’t have to hold the object, just fire and forget, but unless I explicitly call setConstants(to:0) it wouldn’t work :( I was tempted to made all the methods to return self that way I would be able to chain all the calls and wouldn’t have to hold a reference, but I’m not sure that’s a valid use for your utility object. BTW, I like it.

Julioacarrettoni commented 6 years ago

Regarding the iPhone X issue, let me investigate, it didn’t saw that, but I didn’t test it properly at the end, maybe on of my latest changes screwed it up :|