---
title: "How to use table view controller with small sized in iOS?"  
description: "How to use table view controller with small sized in iOS?"  
author: "Anonymous User"  
published: 2015-12-09  
updated: 2015-12-10  
canonical: https://www.mindstick.com/forum/33709/how-to-use-table-view-controller-with-small-sized-in-ios  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# How to use table view controller with small sized in iOS?

I have created an app using **UITableViewController**, its method **initWithStyle**: automatically creates the underlying UITableView with- according to the [documentation](https://answers.mindstick.com/qa/30462/what-is-documentation) - **"the correct [dimensions](https://www.mindstick.com/forum/1834/c-sharp-xaml-how-to-modify-the-dimensions-of-the-rows-and-the-columns-of-a-grid)".**

Now, my [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) is that these "correct dimensions" seem **320 x 460** ([default](https://www.mindstick.com/interview/12771/what-is-the-importance-of-default-resources) [screen size](https://www.mindstick.com/forum/158657/how-can-you-make-an-image-responsive-and-adjust-its-size-based-on-the-screen-size-using-css) of iPhone), but I'm pushing this TableView / Controller pair into a **UINavigationController** which is itself contained in a **UIView**, which itself is about half the height of the screen.

Now, my [question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time) arises that what is the proper way to set a table [view controller](https://www.mindstick.com/interview/23330/what-is-mvc-model-view-controller) to resize its [component](https://www.mindstick.com/articles/12262/learn-how-to-make-a-component-in-magento-2) UITableView to a specified rectangle?

## Replies

### Reply by Tarun Kumar

I also face the same problem as your's. but I solve it.\
Use code like this:

```
-(void)loadView{  [self setView:[[[UIView alloc] initWithFrame:CGRectZero] autorelease]];  [[self view] setAutoresizesSubviews:NO];  [self setResultsTable:[[DataViewController alloc] initWithNibName:nil bundle:nil]];  [[resultsTable view] setFrame:CGRectMake(0,45, 320, 200)];}
```

above code is written under the parent [controller](https://www.mindstick.com/blog/273/passing-values-from-controller-to-view-in-asp-dot-net-mvc).


---

Original Source: https://www.mindstick.com/forum/33709/how-to-use-table-view-controller-with-small-sized-in-ios

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
