ios - Resize UITableView for iPhone 5 -


how can adapt uitableview height iphone 4-inch screen? have following configuration, works iphone 4. on iphone 5 (see image below) there blank space because tableview not rezise. tableview scrollable.

i've autolaout enabled , tried defining horizontal , vertical spacing constraints views , tableview, same results (see image below). suggestion?

enter image description here

enter image description here

this viewcontroller placed inside placeholder since created custom menu. tried settting constant of placeholder in parent view following code. not working, tableview clipped.

-(void) viewdidload{       if([[uiscreen mainscreen] bounds].size.height == 568) //iphone 4inch         {             nslog(@"iphone5");              self.dynamictvheight.constant = 465;             [self.placeholder needsupdateconstraints];         }         else{             nslog(@"iphone4");             self.dynamictvheight.constant = 375;             [self.placeholder needsupdateconstraints];         } 

and these constraints of parentview, implements custom navigation menu. did 2 tests:

with vertical , horizontal spacing constraints: enter image description here

and height constraint in placeholder:

enter image description here

you need set bottomspacetocontainer (or bottom layout) 0.

make sure there no warnings or errors in nib file (indicated yellow or red sign on uitableview). if there none, make sure have 4 constraints needed describe uitableview's position.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -