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

After rotating to landscape and back to portrait location UI is broken #102

Closed
alexsorokoletov opened this issue Dec 3, 2014 · 11 comments
Closed

Comments

@alexsorokoletov
Copy link
Contributor

Even if you rotate on previous page and then open passcode view in a portrait mode.

Was able to reproduce on demo application by enabling landscape orientations in project, then launching the app, rotating it to landscape, rotating back to portrait and pressing button "enable" in the demo app.

@rolandleth
Copy link
Owner

iPhone? Or iPad too? Because I haven't really tested landscape on iPhone at all.

@alexsorokoletov
Copy link
Contributor Author

iPhone 6, reproduced on Simulator.
I think you can reproduce this on any iOS simulator and device.

@alexsorokoletov
Copy link
Contributor Author

screenshot 2014-12-02 23 54 14

@alexsorokoletov
Copy link
Contributor Author

screenshot 2014-12-02 23 27 36

When I rotate device for first time, this code gets called and then viewDidLoad is called and views are being set up.

@rolandleth
Copy link
Owner

I don't think I will be able to help any time soon. As I said, I haven't tested rotation on iPhone (which is why the demo comes without landscape), and I'm kinda busy in the near future.

If you have time and manage to find something, please let me know.

@alexsorokoletov
Copy link
Contributor Author

If you can give me any clue maybe?

@alexsorokoletov
Copy link
Contributor Author

looks like
calling [self statusBarFrameOrOrientationChanged:nil]; in viewDidAppear helps a bit.

- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    [self statusBarFrameOrOrientationChanged:nil];
//...other code 
 }

I'm still not sure how and why you have this subscription to statusBarFrameOrOrientationChanged.

@rolandleth
Copy link
Owner

Because the view is added on the window, and the window doesn't process rotation changes.

@alexsorokoletov
Copy link
Contributor Author

We decided to write our own passcode controller which will suppor screen rotation and will use buttons (instead of keyboard). Reasons for that were:

  1. No way to control when show/hide passcode controller - especially when handling pushes
  2. Broken layout on landscape/portrait changes
  3. Keyboard was hidden sometimes
  4. Use of C#/Xamarin.iOS instead of ObjC bindings to LTHPasscodeController.

Thank you, @rolandleth, with your help we were able to get very good passcode functionality over quick time!
However it's time to move further ;)

@valdetero
Copy link

@alexsorokoletov is your control open source or available for use?

@rolandleth
Copy link
Owner

Fixed in 3.6.8.

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

No branches or pull requests

3 participants