Application with UITabBar too heavy. Suggestions?

Discussion in 'iOS Programming' started by Soulstorm, Jul 29, 2009.

  1. Soulstorm macrumors 68000


    Feb 1, 2005
    I have made an application that relies on a UITabBar to navigate through different functions. I have almost completed it, but I have found out just yesterday that it is too heavy for the system, resulting in the system crashing. More specifically:

    • The application Launches. Usage is 5 MBytes, because a nib for a first view controller is loaded, which I need again once the user proceeds to the next screen.
    • The next screen, is the main screen, which uses the UITabBar. Application remains on 6mBytes of usage
    • When pressing different items in the tab bar, I force it to load different nibs associated with those buttons, so the application at some point uses 14mBytes of data. I have 5 view controllers in all for 5 buttons in the tab bar (of course those view controllers have navigation controllers and other subviews loaded with table views etc.)
    • So, the application quits when I try to use the internal Camera with my application, since the camera alone boosts my application to 22MBytes of usage!

    I don't know what to do now. Is there any way to force the system to give back RAM from controllers that aren't being displayed? For example, is there any way I can release controllers that are not associated with the currently selected view of the Tab Bar Controller?

    I would appreciate any recommendation on this.
  2. dejo Moderator


    Staff Member

    Sep 2, 2004
    The Centennial State
    Do you know if applicationDidReceiveMemoryWarning: is being triggered.
  3. Soulstorm thread starter macrumors 68000


    Feb 1, 2005
    Not yet. But the high memory usage of my application leads me to believe that this is the cause of all problems.

Share This Page