2

In iOS 6, my login tableview that consisted of two rows (Username and Password) was completely shown correctly. In iOS 7, the bottom row is cut off, and I don't know why or how to correct the issue. Nothing changed except for upgrading to Xcode 5 and running on the iOS 7 simulator.

enter image description here

UPDATE: adding more images

enter image description here enter image description here

Adam Johns
  • 35,397
  • 25
  • 123
  • 176
  • How are you creating the table view? How are you positioning it? You may need to show some code. – i_am_jorf Oct 02 '13 at 04:17
  • I have added my cellforrowatindexpath method, but adding the table view and positioning is done in storyboard – Adam Johns Oct 02 '13 at 04:19
  • @AdamJohns then I think you should probably check your layout in the storyboard, I bet your autolayout constraints aren't quite what you think they are. – RonLugge Oct 02 '13 at 04:22
  • @RonLugge how exactly do I do that? I'm not too familiar with autolayout. – Adam Johns Oct 02 '13 at 04:23
  • Click on the object, go the pane on the right, and bring up the 'size' inspector. Despite it's name, if you scroll down you should see the layout you've defined. What may be going on is that you don't have a specific height and width defined, but rather a distance from other objects -- and that distance is producing 'funky' results when those objects shift. – RonLugge Oct 02 '13 at 04:29
  • @RonLugge I added more images showing my scene and size inspector tab. I'm not sure how to tell if I am specifying a distance from other objects? – Adam Johns Oct 04 '13 at 03:21
  • @AdamJohns you're specifying a height, a top space to superview, a leading space to superview, and a trailing space to superview. You're also specifying a center-x to the button, but that will really only center the button, you've already locked the table's position in place. What I find interesting is that it looks like your tableview is underlapping the status bar, or is that an illusion in the picture above? – RonLugge Oct 04 '13 at 14:58

6 Answers6

6

try playing with navigationBar.translucent property in your view controller. in iOS 6 it is NO by default, but YES in iOS 7. I had a similar issue and this fixed it for me.

unspokenblabber
  • 1,567
  • 1
  • 11
  • 19
  • This fixed this problem for me, but does anyone have an idea why this property set to `YES` would cause the bottom of a tableview to be cut off? The frame of my tableview is initialized with the view's frame, added to the view's subview, and there's no other views. – Evan R Jul 19 '14 at 03:12
  • One reason could be a constrained height. The top y being where the nav starts could push the bottom down in this case. – Peter DeWeese Jul 19 '14 at 12:23
0

Just check your UITableView frame in iOS7, may be you are running it on 3.5 inch view and it will shrink.

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
0

Looking at the provided image, I think you may be underlapping the nav bar. Or to put it another way, your nav bar is on top of hte table. Though I'm not sure why that would cut off the bottom of the login information

RonLugge
  • 5,086
  • 5
  • 33
  • 61
  • no, the underlapping is not the issue, as I have already taken care of the underlapping successfully by using [this](http://stackoverflow.com/questions/17074365/status-bar-and-navigation-bar-appear-over-my-views-bounds-in-ios-7) – Adam Johns Oct 04 '13 at 15:23
0

I've found that simply changing from GROUPED to PLAIN table view style fixes the "underlap" issue with the section #0 header, but modifies the color of the section header views. I set the tableview background color in my app. With PLAIN style, the section header background color is messed up. The section header color is close to the tableview background color, but slightly modified. This does NOT happen if I simply switch back to GROUPED. It sounds like an iOS7 bug or an Xcode bug.

0

The translucent = NO fixed it for some cases. In others, I ended up adjusting the tableView in viewDidLoad

- (void)viewDidLoad 
{
 [super viewDidLoad];

 CGRect f = self.tableView.frame;
 f.origin.y += self.navigationController.navigationBar.frame.size.height;
 f.size.height -= self.navigationController.navigationBar.frame.size.height;
 self.tableView.frame = f;
}
pstoppani
  • 2,531
  • 1
  • 20
  • 20
-1

This is obviously some kind of issue with the grouped table view style. All I had to to was go into the storyboard scene, select the table view, then in the attributes inspector change the style from grouped to plain. It works as intended now without being cut off.

Adam Johns
  • 35,397
  • 25
  • 123
  • 176
  • 1
    This isn't really a solution, more of a work-around. I believe the answer suggested by unspokenblabber is the actual answer – ephilip Oct 21 '13 at 17:32
  • Fair enough, it ended up being the issue on my app. My point was that changing the style of the table isn't really a solution. – ephilip Oct 23 '13 at 13:55