Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I've just completed pretty much the same and ran into the same problems but eventually I got it working.</p> <ol> <li><p>Create a View Controller class in Xcode called <code>Test1ViewController</code> and add the following:</p> <pre><code>@interface Test1ViewController : UIViewController { IBOutlet UITabBarController *tbc; } @property (nonatomic,retain) IBOutlet UITabBarController *tbc; @end </code></pre></li> <li><p>Create a View XIB called <code>Test1View</code></p></li> <li><p>Add a <code>TabBarViewController</code> to the XIB</p></li> <li><p>Set the File's Owner in the XIB to be the <code>Test1ViewController</code>.</p></li> <li><p>Connect the <code>tbc</code> IBOutlet in the File's Owner to the Tab Bar Controller in the XIB.</p></li> <li><p>Connect the <code>view</code> IBOutlet in the File's Owner to the View in the XIB.</p></li> <li><p>In your SplashViewController.h add the property </p> <pre><code>Test1ViewController *tabBarViewController; </code></pre></li> <li><p>Synthesize the <code>tabBarViewController</code> in your <code>SplashViewController.m</code>.</p></li> <li><p>Replace your <code>TabBarController</code> creation code in your <code>loadView</code> method in <code>SplashViewController</code> with the following:</p> <pre><code>tabBarViewController = [[Test1ViewController alloc] initWithNibName: @"Test1View" bundle:[NSBundle mainBundle]]; tabBarViewController.view.alpha = 0.0; [self.view addSubview:[tabBarViewController view]]; </code></pre></li> <li><p>Here's the bit that was missing for me. In <code>Test1ViewController.m</code>, you need to add the following line to the <code>viewDidLoad</code> method:</p> <pre><code>self.view = tbc.view; </code></pre></li> <li><p>Finally, I also had to change the <code>finishedFading</code> method in <code>SplashViewController.m</code> to set the alpha to 1.0 on the <code>tabBarViewController</code> view.</p> <pre><code>-(void) finishedFading { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.75]; self.view.alpha = 1.0; tabBarViewController.view.alpha = 1.0; [UIView commitAnimations]; [splashImageView removeFromSuperview]; } </code></pre></li> </ol> <p>I hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload