UITabBarController icons display incorrectly - ios

I am building a universal iOS App. I have 5 icons on the UITabBarController and two of them are displayed incorrectly. They are higher on the UITabBarController than the rest of the icons. I can't figure out what the issue is.

First:
Select your Tab Bar Item in the storyboard.
Second:
Set the insets you want:
Sidenote: (Probably your actual problem)
Make sure your images are correct size in pixels before adding it to your project, to avoid taking up to much space and have the images sticking outside the UITabBar. All your icons should have the exact same height/width when you add them to the project.

Related

Increasing height of UINavigationBar

I use standard UINavigationController with custom provided UINavigationBar. I cannot find a way how to expand the height of the bar, yellow area on the screenshot. Need to put a UIView on extra space.
Looks like a simple task, but after trying everything I'm out of ideas :(
Should support iOS 11+.

UITabBarController icons not showing up

I have an app that has a UITabBarController with four view controllers embedded.
I've created icons for both normal and selected states and set them via the interface builder. The sizes of the individual icons vary slightly according to the new design guidelines. Also the icons are PDFs. I initially set it's Render As property to Template Image.
The titles of the tab bar icons show up but not the icons.
But they do show up in the interface builder though.
Then I set the Render As to both Original and Default but neither worked.
I'm using Xcode 10.1. What am I missing here?
It seems problem with image you are using. try setting different insets to image and tab bar icon will appear.
i have set some inset for icon and icon appeared in simulator.so you will need proper icon image for asset or would required proper inset for icons.

Label in tableview header doesn't appear on ipad but on iphone

in my universal app I have an UITableViewController embedded in a UINavigationController. When I add a UIView to the top of the tableView and insert a UILabel which is centered in the container, the label is only visible on iPhone but not on iPad.
I tried creating a new testapp, only consisting of these two controllers, the view and the label. It works on both, iPhone and iPad. So I added two new controllers to my app in the same way and made the navigation controller the initial view controller. Label is visible on iPhone but not on iPad.
For me it seems, that I have changed some global settings in the app; on another view I have similar problems with stackViews, but I first concentrate on this "simple" problem...
Any ideas what might be wrong in my app-settings?
tableViewController embedded in navigationController
Take a UIViewController embedded in a UINavigationController. Add View, Label, and TableView and check it
Ok. Now I know what was the problem. Never have checked, what's going on with those size classes.
During development I changed from any/any to a smaller size, not knowing, that this is not only taking effect on the layout in the storyboard. Everything I added after changing did'nt show on iPad.
Solution: Select storyboard, in "File Inspector", uncheck "Use Size Classes"

UIButton is out of navigation bar

I have a custom UI Button (just regular button but with image), within the navigation bar, but when I choose my image it looks like this in designer:
As you can see here, it's over my provider and status labels, and also when I run application it's over the WebView (which is bellow), so definitely out of navigation bar. I tried to find in storyboard some property where I can adjust this but I couldn't find any. I'm using swift and storyboards.
Appreciate any help, iOS newbie :)
Based on your description I think your issue is that you are trying to add a button for navigation. What you need is a NavigationBar with a NavigationItem/BarButtonItem in it. If you look in the object library you will be able to find these.
Just drag them onto your story board. Once there select the button and in the side menu you will be able to select the Image for that Item. Now it is in the navigation bar up top. Let me know if there are still issues. 👱🏼
You have to make sure your 1x image is to the specified size (and then your 2x etc, or just use a PDF at the 1x size.
Icon sizes are here: iOS Human Interface Guidelines: Icon and Image Sizes
I made my pdf 22x22 and added it to .xcassets with scale factor "single vector"

XCode can't fix landscape orientation layout in storyboard

I have a simple linear chain of UIViewControllers.
The first one has a show segue to a NavigationViewController, then it goes on the same way with all the others.
When I switch from wCompact-hRegular to wRegular-hCompact to fix the landscape layouts the first viewcontroller doesn't allow me to do anything. The tree diagram at the left side of the storyboard screen shows the views but they are not written in black. They are transparent. Even if I select them and put the coordinates or dimensions nothing happens. There are only a button and a label. Others Controllers are all ok, they can be fixed. What is happening to the first one?
With XCode 6 you can add views, that are only visible in the selected size class (f.e. Compact + Compact). When you change to a different size class the views are disabled. To fix this navigate to the attributes inspector and select installed for any class sizes.

Resources