iOS 6/7 Delta's not working iOS 7.1 - ios

My app is in the app store, was working fine with deltas set for ios7. With the recent 7.1 update, these deltas seem to magically have stopped working.
Anyone know more about this issue? Googling provided no relevant links. This HAS to have happened to someone else.

This problem was eating my lunch, too. In my particular case, it was an easy fix.
For me, the crux of the problem was my ignorance of the implications of a translucent navigation bars I didn't even need to use the iOS 6/7 deltas the way I was using them.
With a translucent navigation bar, the coordinate (0,0) of the parent view is the top left corner of the navigation bar. However, when the navigation bar is opaque, the parent view's coordinate (0,0) is just below the navigation bar on the far left. I was using iOS 6/7 deltas to compensate for the different navigation bar heights between the two platform versions. I was trying to use translucent navigation bars like opaque navigation bars and I didn't realize it.
My solution was to change all of my navigation bars to opaque and move the views to autolayout. This allowed my views & controls to be positioned relative to the "top" of the parent view with "top" being what I was expecting: the border of the navigation bar.
Hopefully this helps.

Related

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.

iOS 6/7 20px difference using autolayout

I've got a background for the project that I am working on, which includes a 20px coloured bar for the top of an iOS 7 device.
This worked fine without autolayout, setting a 20px delta in storyboard. But now I can't do that, and I am stuck with constraints - which I cannot set on a per-OS basis.
Whatever I do, I seem to end up with the version on iOS 7 being 20px higher than on ios 6... Something I need to rectify, as I also have a bar under that status bar which is coloured for a navigation controller.
I've attached the background image - if I need to modify it to work with autolayout, I'm happy to do that.
There is a "top layout guide" object in your view hierarchy. If you build vertical constraints based on that, they pin to the top of the window if there is no status bar, or under the status bar otherwise. Use that.

Any quick solution to make a view appear behind the status bar in iOS 7?

I'm porting my app from iOS 6 to IOS 7 (there will eventually be a complete GUI redesign for iOS 7 but in the meanwhile just getting the existing GUI to display properly on iOS 7 is the goal.
I had the issue where the status bar was overlapping my GUI and so have shifted the Y origin of the view controller's view down by 20.
However my app contains a pulldown which when retracted is overlapping with the status bar. In the screenshot the red is a button which is present in the pulldown view. The grey bar is the top of the main view behind which a portion of pulldown is hiding when retracted.
I implemented the pull down as a fixed size child subview of the main view and when retracted its Y origin is a negative number thus it is effectively still displayed but off the top of the screen. When the user pulls it down I just animate the increase in the Y origin until eventually the origin is 0.
Is there some way I can make the pull down view appear beneath the status bar or some other quick solution?
Note of course I can't simply toggle the pulldown's alpha to display/hide it as it pullsdown obviously thus its appearance/disappearance is not a discreen action. I could maybe attempt to make the portion of it that is on top of the status bar invisible but as its something that is moving that seems like its going to be complicated. Is there any simple solution?
Thanks
Add another view, with a fixed position, under the status bar (with the same color of your grey bar), 20px tall and same width of the status bar, but with a z-index higher than the retracting view. This view will cover the retracting view (but not the status bar) acting as a "background" for the status bar itself. Obviously you have to adjust the Y position of the retracting view to make it tappable by the user (but under the status bar)
iOS 7 by default lets views take up the fullscreen, including the status bar. This is controlled using the UIRectEdgeAll property.
If you want the old style view, set UIRectEdgeNone for self.edgesForExtendedLayout
in viewDidLoad:
self.edgesForExtendedLayout = UIRectEdgeNone;

How to increase the height of the navigation bar and change the vertical position of the title using xcode 5 (iOS7)?

I developed a simple app for iOS6 and now I'm to updating its appearence for iOS7. One of the first changes I would like to do concerns the navigation bar.
I'm using the standard navigation bar UI component that comes with xcode. While in iOS6 the navigation bar was clearly placed under the status bar (i.e. battery, carrier and hour), in iOS7 the navigation bar blends with the status bar.
My question is: how can I increase the height of the navigation bar and place the title vertically a little lower than the default position?
Currently I have this:
And the title is too close to the time. I would like to achieve this (standard Photos app that comes with iOS7):
here the title of the bar is lower and the bar is larger (or is just shifted down).
It have been trying to modify the height of the navigation bar through the size inspector but with no success.
It's probaly a very easy issue to solve, however I'm still new to xcode development and I can't figure it out.
Stick the view controller in a Navigation Controller, that should immediately solve the problem

Resources