iphone - Loading a view controller from viewDidLoad -


Hello, I want to create a tabbar application in the iPhone using X-code. I have a splash screen and after that I have my home screen where I want to create a tabbar in that scene. So, I create a tabbar in my ViewDidLoad method.

  - (zero) viewDidoad {in NSLog (@ "Home"); TabBarController = [[UITabBarController alloc] init]; HomeViewController = [[HomeViewController alloc] init]; NextViewController = [[NextViewController alloc] init]; TabBarController.viewControllers = [NSArray arrayWithObjects: homeViewController, Next ViewController, Zero]; Window = [[UIWindow alloc] initWithFrame: [UIScreen main screen]. Bounce]; [Add windowSubviewview: Tabbar controller. picture]; [Window-making and knowledgeable]; [Super viewedload]; }  

Now when I compile & amp; Run, this home will call Viv again & amp; Again and when I tap on another tab it will not call NextView.

Do not you add home viu controllers repeatedly because the scene is in the visual veui controller ...


Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -