ios - How to make UITableview exact height and removing unwanted white space footer? -


i have following issue having 1 button on main view if click on button add subview on main view tableview here code

viewcontroller *settings = [[viewcontroller alloc]initwithnibname:@"viewcontroller" bundle:nil]; settings.delegate=self; [settings.view setframe:cgrectmake(0, 30, self.view.frame.size.width,250)]; [self.view addsubview:settings.view]; 

after click on button subview tableview rest of them having whitespace.

then how remove remaining whitespace.

enter image description here

at first sight, looks have set wrong height of viewcontroller's view i.e., 250. make sure tableview inside view have same height assigning in setframe function here:

viewcontroller *settings = [[viewcontroller alloc]initwithnibname:@"viewcontroller" bundle:nil]; settings.delegate=self; [settings.view setframe:cgrectmake(0, 30, self.view.frame.size.width, heightofyourtableview)]; [self.view addsubview:settings.view]; 

hope helps!


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -