Tutorial :UIView being double-drawn in device, but not simulator



Question:

I have a view with buttons. This view sits in a tabbarcontroller. I have just gotten an issue which appears in the device, but not in simulator. If I switch to another tab and back again the view is redrawn and my buttons come out doubled. I know this because the borders are thicker and the buttons with variable text overwrite each other.

What could be the problem and how do I resolve it? My feeling is that it has to do with memory, but I have no idea how to debug the issue.


Solution:1

I doubt that is a memory issue. If you are not using Interface Builder to initialize the view make sure that you are not creating the view twice by an accident. Another possibility might be that the view gets rendered twice for an unknown reason. Try to break you app at the place of tab switching and check the view. There should only be one UIView (pointer).


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »