Newbie here learning programming. I created a table and a detail view. Once I click a row, it will direct to the detail view which shows detail info of that row. I also maintain a navigation bar on top. This all works fine.
However, once I click into the detail view. The Behavior of iOS6 and 7 is different. In 6, it seems like the view is placed nicely below the navigation bar. But in 7, the view is like placed right under the bar.
What is wrong?
Try adding this to your view:
if ([self respondsToSelector:#selector(edgesForExtendedLayout)])
self.edgesForExtendedLayout = UIRectEdgeNone;
Related
When I minimize and maximize app in iOS 6 whole application view moves up by 20 pixel. (looks like ignoring status bar) But on iOS 7 its ok because status bar is overlaid on the application view.
I don't want app view to be moved up.
Can anyone explain what's happening?
I know that this is bad solution but I had no other way to do this :(
I just moved down main window by 20 pixel in applicationWillEnterForeground.
- (void)applicationWillEnterForeground:(UIApplication *)application
{
if(!iOS7)
[self.window setY:20];
}
This works good now : )
Hope this helps anyone : )
This worked for me:
I checked "Adjust Scroll View Insets" in the MainStoryboard Attributes Inspector and it worked.
NOTE: I'm using a UITAbleView embedded in a Navigation Controller embedded in a tabViewController. I "selected" the main TabBarViewController.
The screen doesn't hide behind the header anymore.
This link helped a lot: UITableView embedded in other view has wrong position of section header
I tried to update one of my IOS6 app to IOS7 using Xcode 5 GM which was just released couple of days ago.
One of the main problem I met is that some of the table views (UITableViewController) cannot be shown correctly anymore after being recompiled by IOS7 SDK:
Some of them cannot shown the last cells completely: You can see half of the last cell right there, but cannot scroll down to see full of it; some others cannot show the first cells completely: half of the cells was hide and you need to draw down the table view to see it.
BTW, those problematic tableViewControllers are all embedded in tab bar controllers.
Could anybody help me with this? Thanks.
UPDATE:
I tried several ways, and here's my solution:
Delete the tab bar controllers, and add them back through editor->embed in->tab bar controller (I tried to drag out a tab bar controller from the object library directly, but that didn't fix the problem. Don't know why).
Re-link other view controllers to this new tab bar controller and run the app. Now, you probably see the first cell still cannot be show completely as I described before, but the last one can be shown correctly.
Go back to storyboard, select the tab bar controller and deselect "under top bars" in the attributes inspector. Run it again, everything works fine, at least for me.
I think it's not a bug but rather a UI design as intended. As you can see the overlap of Tabbar still have some see through effect.
As I dont want to resize my table view to fit specific above the Tabbar.
Workaround with last cell bottom padding or add in extra last cell with same height as Tabbar?
I was developing an App for iOS 6 and this is one of my views.
Now I've updated my iPhone to iOS 7 and this is the result:
Now all the views are behind the navigation bar because iOS 7' UIViewController's views starts at the top left edge of the screen and not under the UINavigationBar as iOS 6.
Now the "email" field is behind the navigation bar.
Is there a way to use the iOS 6 style?
Thanks
Marco
STEP BY STEP WITH IMAGES
Upon reading this question I was experimenting as I had the exact same question. I then found the answer.
1) Make sure storyboard is on iOS 7
2.) Select the viewcontroller from the storyboard (In your case the Login Controller)
3.) Make sure that 'Under Top Bars' is Deselected
You need to turn off translucent for the navigation bar and that should adjust the iOS 7 constraints to be the bottom of the navigation bar again.
They have completely removed the old style for navigation bars in iOS 7. You could set the navigation bar to be an image, which could utilize the look from iOS 6, but I think it would be safer to just go with the new iOS 7 default appearance.
I had a similar problem and I fixed it by writing following code in the views' viewWillAppear method:
self.edgesForExtendedLayout = UIRectEdgeNone;
I have an iOS app where the main screen is a UICollectionViewController. When selecting an Item from the collection view the view is pushed to a detail view of the item. In the detail view I built a drawer/slider that moves out from the side. In order to get the view to look the way I wanted I hid the default navigation bar and inserted one via storyboards.
I ran into an issue that when hiding the default navigation bar you lose the back button functionality that comes with using a navigation controller. I worked around this by adding a button where the back button would have been (the image above is shown without the button). Now I use the line of code below to move back to the collection view.
[self.navigationController popToRootViewControllerAnimated:YES];
It works the way I want it except that I lose my Navigation Bar when I return to the collection view. Does anyone have any thoughts on how to fix this? Thanks in advance!
In viewWillAppear of your rootViewControler
-(void)viewWillAppear:(BOOL)animated{
[self.navigationController setNavigationBarHidden:NO];
}
I know this thread it's a little dated (more than dated more like an archive). But I ran into the same issue in swift 5, Xcode 13. Below is the swift code that I used in my viewWillAppear in case it helps someone.
self.navigationController?.setNavigationBarHidden(false , animated: true)
My iPhone app starts off (using a storyboard) with a navigation controller, then a table view controller; what I want to do next is use a tool bar to provide options to go to other table view controllers. The problem is that the tool bar is buried off screen. I would like it to be more like a screen footer, always visible to the user. What is the best way to do this?
The toolbar was originally added to the tableview so as the list got longer the toolbar showed up at the end of the list hidden off the screen unless you scrolled down.
To fix this problem in the Attributes section of the Navigation Controller in the Simulated Metrics I set Bottom Bar to Toolbar. I then did the same thing in the Table View Controller. I then added the Bar Button Items to the toolbar on the Table View Controller.
Then I had to control where the toolbar appeared downstream by calling
- (void)viewWillAppear:(BOOL)animated
{
self.navigationController.toolbarHidden = YES;
}
in the applicable table view controllers and setting YES or NO.
For some reason I was unable to find good documentation for this process. It probably is out there, but I have included it here for others who may have this problem.