iOS 11 Tab Bar items are offset - ios

After upgrading to Xcode 9 and building my app for iOS 11, I have had a problem with the positioning of items in the UITabBar. They are offset to the left (shown in red outline).
I am using just a regular UITabBarController and have not done any custom UI code. I've tried looking for any new UITabBar properties that would effect this, but I can't find anything. Messing with UITabBar itemPositioning property doesn't fix the issue.

Related

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.

Xcode 8 storyboard view controllers all blue background

When I first created my storyboard all the elements on each UIViewController showed up just fine; however, after opening up my storyboard again the view controllers have turned all blue.
Is this some kind of issue with Xcode or is there a setting that turns my view controllers blue?
I have checked each subview's (UIViews, UIImageViews, etc.) tint color and background color.
I think you have to tap each of them to give them the tabbar icon, then it will become normal
Rashwan here says that having to add an image, while a good thing, is also a Xcode 8.0 bug that it turns your entire screen blue.
I added an image to the tab bar and it make my screen visible. However, the area where I added an image in the tab bar is now blue and it doesn't display properly when run on the simulator.
I think the solution is to upgrade Xcode past 8.0.

Status bar overlaps on my view

I have a UIViewController subclass which when I run the app on iOS 7, the status bar shows on top of my view. Is there a way to avoid this? I do not want the status bar to be hidden. Is there a way to show the status bar above my app. I present my view using presentViewController. Please guide what I am missing?
In Xcode, In storyboard there is an option of iOS6/7 delta. set delta Y to 20 pixel of your view, to make compatible with iOS7.For this you have to disable auto layout, you can use auto resizing.
This is quite common issue. Starting from iOS 7 Status Bar is a part of the controller's view. Apple even have added special attribute of UIView in the Interface Builder: iOS 6/7 Deltas. To fix your problem and make your view look the same in different iOS versions, go to Size inspector and set Delta Y to 20.0.

Xcode swift UIView bottom bar does not display

I'm a beginner in iOs development but I'm a web wedeveloper.
I was trying some small things on Xcode and I face a problem without finding solution or usefull information on the web, take a look to my UiView below
which is quite large, and has a bottom bar with Done button, and and another bar with some button.
But when I'm running the simulator, I can't see this bottom bar guide, I do have a button on it, I have an action on it, the "Hidden" field is not selected.
Any idea why it's happenning (Using Xcode 6 beta 7)?
Set left and right border constraints to 0, and "center horizontally" constraint as well.

Bar Button Items Weirdly Offset in iOS 8

As of Xcode 6 beta 3, there seems to be no padding on my bar button items, and they are pushed all the way to the edges. I am using size classes (single storyboard). When I investigated the storyboard further, it appears that the spot where the bar button item goes is moved off of the navbar somehow. Has anyone else seen this? It happens no matter which layout I select (photo below is on Any/Any).
Here's an image of how it looks in the simulator:
And this is what I see on the storyboard:
Resolved. Beta 4 fixed this issue.

Resources