Changing text color of individual bar button items in navigation bar - ios

I have two bar button items placed in the navigation bar, but I want to change the text color of one to show whether its enabled or disabled. I've seen a lot of solutions for changing the text color for all navigation bar button items, but nothing for one specific bar button item. Most solutions on SO seem to be deprecated for iOS7 and iOS8. Any tips?

Related

Swift How do I stop the tab bar from changing background colors

I'm working on a project that requires a Tabbar. Currently I have my code set up so that after login or sign up I'm presented by the Explore tab (The third tab). The goal I'm trying to achieve is to have my project only show a translucent tab bar background. When I was originally working on my project I had no issue doing this. I ran in the problem after I incorporated a table view that allow for scrolling. Currently when ever I push on the tab 1-4 I get a translucent background. When tab 5 (includes the table view with scrolling) is pressed the background of the tab bar changes to a gray color. Even if I press out of the tab to a different one the gray tab bar background color doesn't change. The only way I found to dismiss the back ground color after the 5th tab has been selected is to scroll all the way down. After I'm scrolled down it allows the user to see the translucent background again. Then you can select different tab bars and you'll see the translucent background again. How do I only show a translucent color
You need to set Bar-Tint colour to Default. ScreenShot

User editable large title in UINavigationBar

I need to allow the users to edit the large title of a navigation bar after they tap it.
The solution I have so far is to instantiate a UITextField and assign it as the titleView property of the nav bar.
The problem with this solution is achieving it with the large title style. The titleView shows up in the center of the navigation bar instead of under the back button, where the large title is supposed to show.
How can I place the UITextField over the position of the large title and mimic its appearance?

UISearchbar squished in UINavigationbar

I have a search bar set as the title view in my navigation bar. In the initial view the search bar is evenly spaced in the middle with buttons on both sides. In this view the back button pushes the search bar so that it is uneven. I've tried getting rid of the text of the back button, but it still didn't work to spread the search bar out. Squished search bar image
I recently needed to solve the same issue. I ended up creating a UIBarButtonItem with the back button image asset, and setting that as the navigationItem.leftBarButtonItem. This button press then calls navigationController?.popViewController(animated: true) to pop the viewController off the stack

All bar buttons on navigation bar have strange blue rectangle

Does anybody know what is going on with these tab bar buttons?
sample 1
sample 2
As you can see strange blue rectangle appears both on buttons with my custom images and with standard style bar button.
As far as I know instance of UIBarButtonItem doesn't have a background property, so this behavior seems to me very odd.

iOS 7 Translucent Tab Bar and Nav Bar

I am having an issue with the translucent UINavigationBar and UITabBar in iOS 7, whereby if I only have the UINavigationBar translucent it works as I would expect it to, however as soon as set the UITabBar to translucent I get a strange effect happening in one out the four tabs in the app. Let my explain with some images:
This image shows the interface where only the nav bar is set to translucent:
With this image showing the result of the user scrolling the content up and under the nav bar:
Now, this is how I would expect it to look, and when the user scrolls the content back from under the nav bar it looks as it did before. However if I also set the UINavigationBar to translucent, and scroll the content to under the nav bar, the result is different to the second image:
Event the tab bar doesn't look right to me. This next image shows that the look of the nav bar if now different to what it was before, when the content is scrolled back from underneath it:
Again, I also don't thing that the look of the tab bar is correct, as the next image shows a different tab with content underneath it, with only a subtle change to the look of the tab bar:
Has anyone else had similar issues to this? (This is all set up in a storyboard)
Well, this was an annoying one. I added a fifth tab which had a MKMapView in it. On running the app and selecting the fifth tab, the tint colour from the nav and tab bars was removed, so I did a search and came across MKMapView affecting UINavigationBar and UITabBar
The test device I was using had iOS 7.0.2 on it, which falls in line with the bug mentioned; so have therefore updated it to the 7.1, and low and behold everything looks as it should.

Resources