iOS8 transition - Different UINavigationBar/UITableView underlap/overlap behavior vs iOS7 - ios

under iOS7.1 my UITableView appears "correctly" (the way I want it) but under iOS8 the UITableView is underlapping the navigation bar. Why? (And how to fix?). I can force the behavior I am looking for in iOS8 by setting navigationBar.translucent = NO, but this is a hack and I lose the transparency.
iOS7: Navigation bar does NOT overlap
iOS8: Navigation bar overlaps

Related

Increasing UINavigationController navigation bar height in Landscape mode

I have seen too many posts on this but unable to find satisfactory answer to this question. Specifically, I want to increase the height of navigation bar of UINavigationController by around 20 pts when iPhone is in landscape mode (not otherwise), and also set a custom image for it's Background. What I have found so far:
Manipulating frame of UINavigationBar managed by navigation controller,
Hacks such as sizeThatFits along with subclassing UINavigationController -- doesn't work for me in iOS 12 and also it is a kind of hack,
Hide the default navigation bar in UINavigationController and instead replace it with a custom navigation bar. But I don't see any sample code. Any sample code will be appreciated.
Edit: Here is how I want my custom navigation bar to look like that works across UINavigation hierarchy.

IOS 11 navigation bar appears smaller than it should

I have a custom navigation bar that worked well until iOS 11. It appears smaller than it should and seems to ignore the status bar height or something.
I set the whole thing programmatically and the height is set to 64.
have you tried to disable (untick) safe area?

Preventing UINavigationController transitions animating upwards with an offset in iOS 11?

I'm updating an app from iOS 10 to iOS 11 with an iOS 9 target and this happens on every segue animation when a navigation bar is involved.
The animation starts with a small offset lower than the height it should be at and then moves to the proper height by the time the view has finished animating.
I'm not doing anything special to the navigation controllers, and it happens to each one in the app. If I programatically hide the navigation bar, the transitions animate normally.
Setting the tableView.contentInsetAdjustmentBehavior to .never in a UINavigationController fixes the problem.
Edit: Actually a better solution is to activate the Under Opaque Bars option for the TableViewController instead.
Otherwise the vertical scroll bars will be behind the iPhone X notch in landscape mode. This worked for me, because I use opaque bars. I don't know what happens if you use translucent bars.
The original solution is described by Prince on the Apple Developer Forums:
After some research ...I found that automaticallyAdjustsScrollViewInsets is deprecated in iOS 11, Now we are to use contentInsetAdjustmentBehavior in UIScrollView type views instead. Setting contentInsetAdjustmentBehavior to .never worked and also the 'UINavigationController translation slide up issue' wouldn't happen if the UINavigationBar is transulcent where the view is under the bar. (Thus the new way of doing the automaticallyAdjustsScrollViewInsets`)
This is not good for Storyboard users because this will have to be done in code.
The top/bottom layout guides were deprecated in iOS11 and I think your issue is connected to this. So you can change the constraints I think.
Read more here.

UIPopoverController iOS 8.3 - UIBarButtons and UISegmentedControl not shown after dismiss

In our app when we present a UIPopoverController, after we dismiss it, if we navigate to any other screens that have barButtonItems or segmentedControls, these are not showing but they are intercepting the touch, so tapping on them works.
Even when we navigate to a new UINavigationController, it still doesn't work.
The navigationBar is visible, but the buttons or the segmentedControls on the view controller's view are not.
The weird thing is that if I enable Color Blended Layers I can see the buttons / segmentedControl.
It happens on multiple screen in our app where we have bar buttons or segmentedControls.
It happens only on iOS 8.3 (we build the app with iOS 8.3 SDK). We tried both presenting the pop over programatically and using the Present as Popover Segue.
The same code works on iOS < 8.3.
Has anyone encountered this issue?
I have attached some screenshots.
I found the issue.
It seems that the tint color of the UIWindow(blue) was overriding the tint color of the UINavigationBar (white) so the UIBarButtonItems were actually blue.
I was setting them both in AppDelegate using UIAppeareance.
The solution was to avoid setting the tint color to the UIWindow and set it directly to the UIView subclasses that I was interested in (UITableView and UIButton)
I have no idea why this happened only after I dismissed the popover and only in iOS 8.3

Move navigation bar in navigation view controller in ios7

I want add 20 points margin to my navigation bar. I need it because I want another background color under status bar as youtube did:
I found
iOS Developer library says: Status bar background appearance provided by the window background, if using UIBarPositionTop.
I found solution for toolbar, but I can't move my navigation bar inside navigation view controller. I just set UIBarPositionTop for my navigation bar, but it changes nothing.
-(UIBarPosition)positionForBar:(id<UIBarPositioning>)bar {
NSLog(#"position method called");
return UIBarPositionTop;
}
I still see the gray background of status bar instead of white.
Is it possible to do it with a navigation bar or should I use a view with a toolbar?
(XCode 6, development target 7.0+, sdk 8.0, autolayout)
UPDATE: ANOTHER WAY TO RESOLVE PROBLEM
I read this question
and understood, that there is no need to add margin. I added view with background color I need over my navigation bar controller and it resolved my problem.
When you are adding your UIView to the UIWindow, you should change the UIViews size to not underlap the title bar. How to do this is well documented in this post:
Offset on UIWindow addSubview
I hope i understood correctly, look in size inspector, ios 6/7 deltas.
Check this link for an explanation:
Interface Builder: What are the UIView's Layout iOS 6/7 Deltas for?

Resources