Sometiems iOS relayouts the application's view when the application enters background and this leads to failure of internal graphical context. To prevent this, you have to use the following property of the chart view: isUpdatingEnabled
Disable updating when application enters background and reenable it when application resumes. For this, implement the following methods of your applicatin delegate (assuming you have access to your NChartView instance in the m_chartView variable):
- (void)applicationDidEnterBackground:(UIApplication *)application
{
m_chartView.isUpdatingEnabled = NO;
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
m_chartView.isUpdatingEnabled = YES;
}
Please, note, that if you have many instances of NChartView, you have to switch the isUpdatingEnabled value of each one.
Comments
No comments yet.
Please log in to place a comment.