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

interface rotations doesn't work #1

Open
rubenfonseca opened this issue Jul 2, 2012 · 3 comments
Open

interface rotations doesn't work #1

rubenfonseca opened this issue Jul 2, 2012 · 3 comments
Assignees

Comments

@rubenfonseca
Copy link

Hi, thanks for your awesome project!

I have been having heavy problems with interface rotation. I can't make it to work, the views always get completely garbled :( I've tried calling layoutSubviews on -(void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation but it still doesn't work.

Any hint on this? Thanks!

lxcid added a commit that referenced this issue Jul 3, 2012
…sly.

Requires view controller to forward rotation callbacks to the paging view (as shown in the demo).

Each rotation is a reload of the paging view, causing its view to be recycled and cause weird animation on rotation.

Will try to solve it sometimes in the future.
@lxcid
Copy link
Owner

lxcid commented Jul 3, 2012

Hi there,

Thanks for the kind words. I'm sorry the project wasn't very well designed.

I have a quick fix that would requires you to forwards the view controller rotation callback methods to the paging view, like this:

- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)theToInterfaceOrientation duration:(NSTimeInterval)theDuration {
    [self.pagingView willAnimateRotationToInterfaceOrientation:theToInterfaceOrientation duration:theDuration];
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)theToInterfaceOrientation duration:(NSTimeInterval)theDuration {
    [self.pagingView willRotateToInterfaceOrientation:theToInterfaceOrientation duration:theDuration];
}

This should fix the rotation layout problem.

The currently implementation requires a reload for every rotation which cause the views to be recycled, so you might face some animation issue.

I'm not sure when I will have time to come back to fix the remaining issue, but if the remaining issue still bug you, let me know, so that I can find some time to fix it.

Thanks for the head up.

@ghost ghost assigned lxcid Jul 3, 2012
@rubenfonseca
Copy link
Author

Hi! THANKS so much for the quick turnaround! I've tried your code and it works :) As you say sometimes the animations are not perfect because of the recycling of the views, but it's good enough for now :)

Again, thanks so much for the support!

@lxcid
Copy link
Owner

lxcid commented Jul 4, 2012

Great! I'm currently rushing projects at my day work. But will hopefully provides a better fix in near future. finger cross :)

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

2 participants