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 -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -