Home > DeveloperSection > Forums > Adding multiple views to view controller inside a tab controller
Tarun Kumar

Total Post:214

Posted on    September-03-2015 12:01 AM

 iPhone iPhone  Ios  Objective C 

 0 Reply(s)
 632  View(s)
Rate this:

I have a tabview controller to which I added a UIViewController to each tab. I want to have multiple UIViews inside the UIViewController.

So in the implementation of the UIViewController class I added [self.view addSubView:uiview1] and [self.view addSubView:uiview2]. The problem is that when I run the app, it crahes on load.

However, if I only used a single UIView and did: self.view = UIView1 that would work fine.

Does anyone know what is causing the problem? Or if I'm doing something fundamentally wrong?

Don't want to miss updates? Please click the below button!

Follow MindStick