Esqarrouth / EZSwipeController

:point_up_2: UIPageViewController like Snapchat/Tinder/iOS Main Pages
MIT License
842 stars 71 forks source link

Not Working When launched in Landscape #24

Closed BlackRussian closed 8 years ago

BlackRussian commented 8 years ago

There is an issue when launched in landscape the pageViewController width is not streaching to full screen.

Esqarrouth commented 8 years ago

Yeah its not exactly for landscape. But should be compatible with some small changes

dineshthangasamy commented 8 years ago

Worked for me after i did something like this pageViewController.view.frame = CGRect(x: 0, y: 0, width: UIScreen.mainScreen().bounds.width, height: UIScreen.mainScreen().bounds.height)

inside setupPageViewController and didRotateFromInterfaceOrientation.

Should be a very easy fix even if u have to change the Y if u have a status bar.

BlackRussian commented 8 years ago

Thanks @dineshthangasamy worked like a charm. I also added the code to willRotateFromInterfaceOrientation. because i was having some weird transition.

@goktugyil should consider including in your build

Esqarrouth commented 8 years ago

Feel free to send a pull request

dineshthangasamy commented 8 years ago

I ended up doing this public func setFrameForCurrentOrientation(){ pageViewController.view.frame = CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height) }

called this inside setupPageViewController and didRotateFromInterfaceOrientation - will open a PR soon

JFKingsley commented 8 years ago

Since we appear to have working orientation support in currently, I'm going to close this. That said, if any other issues with framing come up feel free to open a new issue.