Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weird rotation in iPad? #149

Closed
hesyifei opened this issue Dec 13, 2015 · 21 comments
Closed

Weird rotation in iPad? #149

hesyifei opened this issue Dec 13, 2015 · 21 comments

Comments

@hesyifei
Copy link

So here is my code for creating the EAIntroView (using Swift)

    let titleColor = UIColor.blackColor()
    let descColor = UIColor.blueColor()

    let page1 = EAIntroPage()
    page1.title = "Some title"
    page1.desc = "Some deep"
    page1.titleColor = titleColor
    page1.descColor = descColor
    page1.bgImage = UIImage(named: "bg1")

    let page2 = EAIntroPage()
    page2.title = "page 2"
    page2.desc = "something again"
    page2.titleColor = titleColor
    page2.descColor = descColor

    let page3 = EAIntroPage()
    page3.title = "page 3"
    page3.desc = "again again again"
    page3.titleColor = titleColor
    page3.descColor = descColor

    let intro = EAIntroView(frame: self.view.bounds, andPages: [page1,page2,page3])
    intro.delegate = self
    intro.pageControl.pageIndicatorTintColor = UIColor.blackColor()
    intro.pageControl.currentPageIndicatorTintColor = UIColor.redColor()

    intro.showInView(self.view, animateDuration: 0.5)

But on my iPad, the following display in iPad:

untitled

How can I fix it? Thanks!

@hesyifei
Copy link
Author

Also, it works fine on iPhone 6 Plus

@ealeksandrov
Copy link
Owner

Thanks for great demo of bug! I will look into it on a week.

@fozoglu
Copy link

fozoglu commented Feb 2, 2016

Hi @ealeksandrov, I want to use in my iPad project. When this problem is solved? Thanks.

@vladdaneliuc
Copy link

i have the same issue

@fabioprodoctor
Copy link

Same issue here.

Does anyone know how to block rotate? I think this can be one workaround for this issue

@ealeksandrov
Copy link
Owner

Can anyone confirm this bug on device?
I struggled with debugging on simulator until tested it on my iPad 4. And it worked flawlessly, just as designed.

@ealeksandrov
Copy link
Owner

Tested:
iOS 9.3 simulators:

  • iPad 2 - working
  • iPad Retina - working
  • iPad Air - broken
  • iPad Air 2 - broken
  • iPad Pro - broken

Devices:

  • iPad 4 - working

Since I can't reproduce this on on my device and there is no possible reason for this behaviour - I consider it as iOS Simulator bug.

@fozoglu
Copy link

fozoglu commented Apr 12, 2016

@ealeksandrov
My Device:
iPad Air (First Generation) - working

Thanks.

@ealeksandrov
Copy link
Owner

Thanks for reporting!
Closing as iOS Simulator bug.

@hesyifei
Copy link
Author

iPad Air (First Generation) - broken :(

Really, I still have the same problem on my device as well as in simulator. :(

@ealeksandrov
Copy link
Owner

O_o
File a radar. I really can't see any reason for this behaviour. This is iOS autolayout issue.

Different behaviour on iPad Air and iPad Retina within the same iOS 9.3 simulator - 100% Apple issue.

@koloritcm
Copy link

I have the same problem. It seems the layout doesn't change so e.g. the portrait layout is still there even if you switch to landscape. Verified on iPad Air 2.

@ealeksandrov Can you block the rotation?

@ealeksandrov
Copy link
Owner

Will look for devices to test it.
Try to override shouldAutorotate in VC containing EAIntroView.

@SnyersK
Copy link

SnyersK commented Jun 17, 2016

I can confirm this occurs with version 2.9.0 on an iPad Air running iOS 9.3.2.
It does change the layout on rotation, but it seems it shows the portrait orientation when rotating to landscape and vice versa.

A 'sort of' workaround is adding the pages again to EAIntroView after the rotation, but the animation remains incorrect of course.

It does however show the correct layout when first opening the intro view on any rotation.

Update:
I see the same behaviour in the iPad Air (9.3) and iPad Air 2 (9.3) simulator.
It seems to be occurring on iPad Pro simulator as well.

@SnyersK
Copy link

SnyersK commented Jun 20, 2016

I can't seem to reproduce this bug using your example app on the same iPad Air.
Tried out a couple of things, it doesn't happen.

I fail to see what's different in my project though.

I'm using EAIntroView in a presented ViewController.
This works perfectly in the example application.

@ealeksandrov
Copy link
Owner

Weird. Thanks for info, lets collect more feedback in this issue.

@ealeksandrov
Copy link
Owner

Can anyone update us on this bug with iOS 10? Particularly with projects and devices already experienced this issue on iOS 9.

@bahrio
Copy link

bahrio commented Sep 30, 2016

Experiencing this problem on the iOS 10 simulator (for iPad Air)

@kee23
Copy link

kee23 commented Sep 30, 2016

Experiencing it on actual device as well (iPad Air 2) using iOS 9.3.1. Same as above, in that the
example works fine, but in project it does not.

I'll update to iOS 10 later and let you know if anything changes.

@algrid
Copy link
Contributor

algrid commented Nov 3, 2016

I also can reproduce this in iOS 10.1 simulator.

It looks like the problem is in UIDeviceOrientationDidChangeNotification handler. You're expecting there that all the frames have already changed after rotation. But it isn't always the case. An alternative would be to override layoutSubviews and do all the changes there.

@ealeksandrov
Copy link
Owner

Fixed by #191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants