So has anyone figured out how to programmatically set a top constraint so that the status bar doesn’t overlap the UItableview ?
I tried adding this bit of code to both the init: and viewDidLoad: methods, but it didn’t do didley. Any other ideas out there ?
CGRect screenRect = [[UIScreen mainScreen] bounds];
CGRect tableRect = CGRectMake(screenRect.origin.x, screenRect.origin.y+200, screenRect.size.width, screenRect.size.height);
I did some googling and oh my god the answers were all over the place, lots of talk about autolayout etc etc (which is a future chapter I have not yet gotten to), but they seem to address solutions dealing with the Interface Builder rather than programmatic solutions.
PS - I am adding 200 just to see a drastic change if it works, from what I read you should be adding an extra 20pt at the top (at least for iphone, other devices might be different I think).