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

Question #121

Closed
kenthinson opened this issue Nov 14, 2014 · 4 comments
Closed

Question #121

kenthinson opened this issue Nov 14, 2014 · 4 comments

Comments

@kenthinson
Copy link

Hello sorry for a noob question.
When I rotate the phone the chart no longer displays properly.
So it looks like I need to call chart.reloadData()
but where is the best place to put that so it will happen every time the interface rotates?

@terryworona
Copy link
Collaborator

Hey @kenthinson, take a peak at either of the demo projects we have set up:

The chart's in the demo project support orientation changes. Hope this helps!

@kenthinson
Copy link
Author

Hi @terryworona. Thanks for trying to help. I have loaded up the demo project in the simulator and rotation does not seem to be supported.

@terryworona
Copy link
Collaborator

Really?

I just cloned anscombe-quartet-ios and rotation works fine on both iOS 7 and 8 sims.

screen shot 2014-11-13 at 5 52 08 pm
screen shot 2014-11-13 at 5 52 38 pm
screen shot 2014-11-13 at 5 53 22 pm
screen shot 2014-11-13 at 5 53 34 pm

@waterskier2007
Copy link

If you have the views in a view controller you could use the transition coordinators in iOS 8

-(void)willTransitionToTraitCollection:(UITraitCollection *)newCollection withTransitionCoordinator:(id)coordinator
{
[coordinator animateAlongsideTransition:^(id animation) {
[self.chartView reloadData];
} completion:nil];
}

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