ios - How to make UITableview exact height? -


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

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

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

then how remove remaining whitespace.

please known me.

before allocate value tableview knows cells count right? try code:

float height=[arraytablevalues count]*height of single cell; tableview.frame=cgrectmake(0,30,self.view.frame.size.width,height); 

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 -