Reputation: 460
I'm developing an iOS app and I could have such a mess.
After changing some parameters in Xcode, like "clears graphic context", now all my views are like that when another view overlays them:
This happens with keyboard, all UIViews, TWTweetComposeViewController and any other object which overlays the view.
What could it be?
Upvotes: 1
Views: 324
Reputation: 460
I solved the problem changing the framework to manage my view controllers.
The issue was due to ECSlidingViewController: after delete it and replace it with ViewDeck, all works like a charm and the application is significantly more fluid.
Upvotes: 0
Reputation: 8905
This is from Apple docs
When set to YES, the drawing buffer is automatically cleared to transparent black before the drawRect: method is called. This behavior ensures that there are no visual artifacts left over when the view’s contents are redrawn. If the view’s opaque property is also set to YES, the backgroundColor property of the view must not be nil or drawing errors may occur. The default value of this property is YES.
If you set the value of this property to NO, you are responsible for ensuring the contents of the view are drawn properly in your drawRect: method. If your drawing code is already heavily optimized, setting this property is NO can improve performance, especially during scrolling when only a portion of the view might need to be redrawn.
I think you should call self.view. clearsContextBeforeDrawing = YES from your viewDidLoad method. You can also check it off/on from Interface builder (screenshot below)
Upvotes: 1