If you leave "View as" set to iOS 7 (the default) the deltas will instead give you the iOS 7 look on iOS 6. The deltas will then be used only on iOS 7 to push the content below the status bar. If you set the iOS 6/7 delta values in Interface Builder, remember to set "View as" to "iOS 6" on the Interface Builder Document, since it is the iOS 6 layout you want to replicate. You may need to do some extra tweaking to make them work for your project. I have tested both ways on an empty application and they both work. That will tell the layout system to place it right below the status bar. Release the mouse and choose "Vertical Spacing". As the mouse gets to the bottom of the status bar, you will see an Autolayout bubble that says "Top Layout Guide". Then, Ctrl-drag from your UITableView towards the status bar. ![]() Using AutoLayout and embedding the UITableView into another view (I believe this is how Apple wants us to do this):Ĭreate an empty UIViewController and drag your UITableView in it. This solves the issue with no extra tweaking needed, and it also preserves your UITableViewController's scene in the storyboard. If you would like to keep the UITableViewController in the storyboard, without manually placing it into another view, you can embed the UITableViewController in a UINavigationController (Editor > Embed In > Navigation Controller) and uncheck "Shows Navigation Bar" in the inspector. Preserving the UITableViewController's scene: I have discovered two solutions to this problem: ![]() This kind of tightly coupled programming is definitely not what Apple wants us to do here. I disagree with everyone who is trying to solve this by using any form of "Magic Numbers" e.g. This issue can be very frustrating, and I believe it is a bug on Apple's end, especially because it shows up in their own pre-wired UITableViewController from the object library. Self.extendedLayoutIncludesOpaqueBars=NO Self.edgesForExtendedLayout=UIRectEdgeNone In the above scenario, the following will have no effect: // These do not work (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath Bars" works to stop the first row from appearing under the status bar, nor can you address this programmatically.Į.g. Looks like i need to modify the first line in this method. It was working fine earlier but since the detailviewcontroller (WebViewController) is now embeded inside a navigation controller, the below code is causing an exception. UPDATE: Following is some code that also needs a fix. I have seen a few questions that are suggesting to use "positionForBar:" and "- (UIBarPosition)positionForBar:(id)bar" but i don't know exactly how to use them, a little explanation and easy way to do it might help. ![]() The tool bar was earlier added by manually dragging it in the storyboard. The status bar and a tool bar is overriding and very close to each other. I have upgraded my project from iOS 6 to iOS 7 but there seems a little problem.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |