0

I don't understand how to keep heigt of rows in UITableViewCell in different screen sizes. I've setted to 50 my custom row Height, in the cell's xib and in the method:

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

return 50;

}

But in IPhone 5 and iphone 6 Plus I'm seeing 8 table cell in the screen. I don't want to. I want the same row height and a lot of more rows in the IPhone 6 plus, like facebook app. How to achieve that?

Iphone 6:

enter image description here

Iphone 5:

enter image description here

I don't want the tablecell height different, i want moar tableview cells.

Alessio Crestani
  • 1,602
  • 4
  • 17
  • 38
  • u want to increase the cell height for iphone 5? – Vamshi Krishna Feb 24 '15 at 08:18
  • Does your tableview have more than 8 rows, if you scroll? There are more rows than that, they're just not visible on the larger screen? – James Frost Feb 24 '15 at 08:22
  • if the row is CGFloat 50 of height, i want 50 of height everytime. So, with different screen's height, i want more rows on bigger screen, and not larger rows. – Alessio Crestani Feb 24 '15 at 08:26
  • Does the cellheight change based on screen size!!!!!!!!!?????it must be giving 50 only no all the time? – Vamshi Krishna Feb 24 '15 at 08:28
  • Looks like you need a launch storyboard or launch images for the 6 and the 6 plus, I'll bet your status bar is also larger too... – Daniel Galasko Feb 24 '15 at 08:45
  • @DanielGalasko I don't understand. Just try facebook and you'll see that It isn't zooming the view of an iphone 5/5s in 6/6p, It will just show more contents. – Alessio Crestani Feb 24 '15 at 10:56
  • Yes @fustalol but Facebook have updated their app to support the 6 and 6 plus. If you don't have a launch image or storyboard set then iOS will upscale the display:) – Daniel Galasko Feb 24 '15 at 10:57

1 Answers1

0

Your issue is that you haven't updated your App to support the 6 and the 6 plus. Thats why your display appears zoomed and you will notice that even the status bar is larger than normal. The quickest way to fix this is to add a launch storyboard, otherwise you can simply add launch images for the 6 and 6 plus. Just check this SO post - How to enable native resolution for apps on iPhone 6 and 6 Plus?

Community
  • 1
  • 1
Daniel Galasko
  • 23,617
  • 8
  • 77
  • 97