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.
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
Post a Comment