Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

5. Weather App WeatherPackt > Time for action — defining the Home screen

Time for action — defining the Home screen

  1. Open the AppDelegate.m file in your newly created WeatherPackt application project. Modify the didFinishLaunchingWithOptions method to include the third view controller in the TabBarController.
    if ([[UIDevicecurrentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
    {
    viewController1 = [[FirstViewControlleralloc] initWithNibName:@"FirstViewController_iPhone"bundle:nil];
    viewController2 = [[SecondViewControlleralloc] initWithNibName:@"SecondViewController_iPhone"bundle:nil];
    viewController3 = [[ThirdViewControlleralloc] initWithNibName:@"ThirdViewController_iPhone"bundle:nil];
    }
    else {
    viewController1 = [[FirstViewControlleralloc] initWithNibName:@"FirstViewController_iPad"bundle:nil];
    viewController2 = [[SecondViewControlleralloc] initWithNibName:@"SecondViewController_iPad"bundle:nil];
    viewController3 = [[ThirdViewControlleralloc] initWithNibName:@"ThirdViewController_iPad"bundle:nil];
    }
    

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint