hollance / MHTabBarController

A custom tab bar controller for iOS 5
488 stars 104 forks source link

My MHTabBarController Becomes a Mess After it Uses External App #20

Open jmoukel opened 10 years ago

jmoukel commented 10 years ago

Hi Matthijs,

Sorry to bother you with this. But I've been struggling with this for about 3 weeks. Any help would be appreciate it.

In my ios app, when I use an extrenal app such as the iPhone Camera (by using the UIImagePickerController) and the iTunes Store (to pay for a service), my app becomes a mess.

Specifically, what becomes a mess is the MHTabBarController you created.

When I say "mess", I mean that the tabs content of the MHTabBarController becomes empty. So when i touch any tab, it does not show anything but just a blank view.

Any idea of why this could happen?

SCREENSHOT: http://i.stack.imgur.com/UFbeE.jpg

Thanks a lot.

jmoukel commented 10 years ago

I fix it.

I was receiving Memory Warnings after I took pictures with the camara. Which appears to be normal, even though my app resizes the picture in another thread. The problem was that the MHTabBarController has, in the didReceiveMemoryWarning method, some code that sets as nil the main views of the tab bar. So after that method is called, everything in the tabs disappears.

I actually just commented the code inside that method.