-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
iOS 7 Animations are a bit choppy #101
Comments
same here. any fix plan ? |
They seem much better to me in the case where Shadow is set to true… Different rendering path? |
Any fix incoming for this? |
I get an immediate improvement to performance by setting the shadowRadius to 0 in the updateShadowForCenterView method after centerView.layer.masksToBounds = YES; -(void)updateShadowForCenterView{
UIView * centerView = self.centerContainerView;
if(self.showsShadow){
centerView.layer.masksToBounds = NO;
centerView.layer.shadowRadius = MMDrawerDefaultShadowRadius;
centerView.layer.shadowOpacity = MMDrawerDefaultShadowOpacity;
centerView.layer.shadowPath = [[UIBezierPath bezierPathWithRect:self.centerContainerView.bounds] CGPath];
}
else {
centerView.layer.shadowPath = [UIBezierPath bezierPathWithRect:CGRectNull].CGPath;
centerView.layer.masksToBounds = YES;
// !! Added line
centerView.layer.shadowRadius = 0;
}
} |
Tried adding line above does improve performance quite a lot |
Like I said before, performance actual seems much better in case where Shadow is set to true. The reason for that seems to be in updateShadowForCenterView. The default is for showsShadow to be true… so in that method the true path is always called on init. If you then say showsShadow = false… the else block is supposed to reverse things and turn off the shadow. But it's not doing that. The fix above is a start:
But I think you also need to add:
It's only when I do that that the core animation debugger stops marking my centered view as needing offscreen render. |
Fixed in #177 |
I've noticed the performance of the animations in iOS 7 are less than ideal. I'm thinking through a few things on how that can be improved.
Discussion can remain in this thread for now.
The text was updated successfully, but these errors were encountered: