Adding multiple views to view controller inside a tab controller

Total Post:214

Points:1642
 979  View(s)
Ratings:
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?

Answer