Tab Bar Icon Doesn't show when selected - interface-builder

I have a tab bar controller and I have set both images using assets for selected and unselected icons. The icons show up correctly in interface builder
when I spin it up on the simulator and that tab is unselected, it shows something like:
But as soon as it's selected, it shows something like:

Removing view controllers along with tab bar controller and adding them again fixed this issue. Don't exactly know which setting was causing it but it got fixed by this method.

Related

Tab bar doesn't show system image. xcode. swift 4

I have a tab bar controller. I can change the image of the tab bar icon using the storyboard, and I can select a custom image and it works. However, I see in the list of images many system images, and I would like to use them, but they don't appear when I run the app. I see them in the storyboard fine, but when I run the app I just see the title of the tab bar text, but not the image.
Thanks

Bar Button Items Not Appearing When iOS Simulator Is Ran

I added 5 bar button items on my main view controller and linked them into code. I also created show segues from the bar button items to other view controllers. Although, when I run the iOS simulator none of my bar button items appear. Can someone help me?
I think you need constraints on your bottom bar, it's probably just not in the right place.
I took a look, tested some versions (you didn't make it easy) and found that if you add bar button items but don't add a toolbar there appears to be a toolbar in the storyboard but not when you run the app, nothing appears.
Instead, remove the items, add a toolbar, constrain it, then add the bar button items within it. You should have no more problems from there.
Good luck on your app! If you have any more questions, just send me a message.

navigation bar in storyboard is mis-rendered

When I was trying to modify the navigation bar's title in one of my view controllers, Xcode seems to render the bar incorrectly, like below:
As you can see, the title and the rightmost button I added earlier are compressed in a strange manner. I tried to re-open Xcode, but it doesn't work.
Does anyone know how to fix this?

Xcode 4.6.3 - Can't select tab bar item on Storyboard?

I'm currently on Xcode 4.6.3. I used storyboards in my project. Inside the storyboard is a tab bar controller and two table view controllers. I have the tab bar controller as the root view and I have it linked up with the two table view controllers via "relationship segue - view controllers".
The main problem I'm experiencing is that I can't seem to select the tab bar item in the storyboard so that I can change the name and the image for that tab bar. When I click on the tab bar, its properties does not appear in my inspector view, or at least, I don't see any property for the title and image. All I see is this
I've read through tutorials online that you can change the title and image of a tab bar item easily just by clicking the tab bar item to reveal the properties. Is this an issue with my version of Xcode?
I already figured it out. It has nothing to do with the Xcode version. The tab bar item subview was in the two table view controllers so just select it there to edit title and image. There's no tab bar item subview in the tab bar controller itself.
I see you have connected your tabs to TableViewControllers...You can edit by clicking the bottom tab of one of the TableViewControllers that you have connected to. If this doesn't work first try a sample project by just keeping your tabs as simple ViewControllers.

How do I add an "add" button to a tab in a uitableviewcontroller within a uitabbarcontroller?

xcode 4.6
using Storyboards
When I drag a Bar Button Item to the navigation bar at the top of one of the UITableViewControllers that are children of the UITabBarController xcode creates a new navigation bar at the bottom of the page instead of adding the button where I dropped it. I would be ok with this, but when I run the app the bottom navigation bar never shows up, so my button is never displayed.
If you need to visualize the app, picture the following: Root controller displays a list of accounts. When an account is clicked a tab controller lists tabs for opportunities and contacts. I need the ability to add opportunities and contacts from the relevant tab
Any help is greatly appreciated.
EDIT
I am not sure if this is the correct solution or not. I have embedded the uitableviewcontrollers in navigation controllers, which appears to have fixed the problem.
Follow-up question - Is this the correct way to handle this situation?
Yes, that is the correct way to handle this situation.
You should embed the view controller inside a navigation controller by clicking the view controller in your storyboard and using the Xcode menu "Editor" > "Embed In" > "Navigation Controller".

Resources