---
title: "Adding multiple views to view controller inside a tab controller"  
description: "Adding multiple views to view controller inside a tab controller"  
author: "Tarun Kumar"  
published: 2015-09-03  
updated: 2015-09-03  
canonical: https://www.mindstick.com/forum/33435/adding-multiple-views-to-view-controller-inside-a-tab-controller  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Adding multiple views to view controller inside a tab controller

I have a tabview [controller](https://www.mindstick.com/blog/273/passing-values-from-controller-to-view-in-asp-dot-net-mvc) to which I added a UIViewController to each tab. I want to have [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) UIViews inside the UIViewController.

So in the [implementation](https://www.mindstick.com/forum/33764/how-to-implementation-of-class-in-c-sharp) of the UIViewController [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp) I added [self.view addSubView:uiview1] and [self.view addSubView:uiview2]. The [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) 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](https://www.mindstick.com/articles/23207/how-to-find-the-best-fit-job-for-anyone) know what is causing the problem? Or if I'm [doing something](https://www.mindstick.com/forum/33390/nsdateformatter-am-i-doing-something-wrong-or-is-this-a-bug) fundamentally [wrong](https://answers.mindstick.com/qa/48468/who-wrote-the-the-wrong-enemy-america-in-afghanistan-2001-2014-and-when)?


---

Original Source: https://www.mindstick.com/forum/33435/adding-multiple-views-to-view-controller-inside-a-tab-controller

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
