title: how to "prepare" a view in the background?
body: <p>I have a two views, 1st is a simple view with some introduction about usage and by click of a button it opens the main view. The main view has many images and two customized tables with rows consists of text and image, thus the creation of the main view is quite slow. The profiler shows most of the time is consumed by imageIO (decode_mcu, png_read_filter_row, pmap_copy_page and decompress_onepass) </p>
  
  <p>I want to optimize by creating the main view immediately after the 1st view is loaded, and when I click the button, it simply set that view to visible or bring that view to front. </p>
  
  <p>I tried to alloc &amp; init the main view in the first view's viewDidLoad</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
      rootVC = [[RootViewController alloc] initWithNibName:@"ViewController" bundle:nil];
      rootVC.delegate = self;
  
  
  }
  </code></pre>
  
  <p>and do this in the button's action method</p>
  
  <pre><code>- (IBAction)buttonUp:(id)sender {
      [self.view addSubview: rootVC.view];
  }
  </code></pre>
  
  <p>But this is not working, the loading still takes very long. How could I sacrifice some memory to make better user experience?</p>
  
  <p>Thanks</p>
  
  <p>Leo</p>