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.
Related
I have a tableview controller which has an embedded navigation bar. I managed to make my nav bar transparent. Now I am trying to achieve a solid color nav bar when I scroll towards the bottom of the table view. I am relatively new to iOS development. So please answer accordingly. I have no idea about scroll views either. I am not sure if I need to add a scroll view or not. If I do, where do I add it? Above the tableview or below it?
Here are a few images of what I want to achieve:
Image 1: Transparent nav bar, but bar button items are visible
Image 2: Transparent nav bar becoming white, bar button items' color changing from white to red
Image 3: This is the final image, where nav bar becomes white and bar button items become red.
If we scroll back up to the top, everything goes back to being the way it was at the start.
I have a transparent custom navigation bar like the one on this picture:
I would like to have a modal view that appears from just under the navigation bar up to half of the screen and make it feels like the navigation bar is expending until half of the screen. And I would like to animate it like if it is sliding down. It will just contain a UILabel, and it will appear when I click on the "i" information button on the top right corner.
I don't know how to make a translucent modal view appears from the middle of the screen instead of from a border. Especially since my navigation bar is transparent and my modal view should not appears behind it while appearing. Do you have any example or tutorial to help me do that?
I am coding in Swift :)
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?
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.
I'm trying to put a UIBarButtonItem with a custom image on a UINavigationBar. When I do however, the image doesn't look right. I want the button on the navigation bar to look like the one below it.
(This is a screenshot from the simulator, by the way, not Interface Builder)
I created the custom UIBarButtonItem by creating a UIButton, using the cog-wheel image as a background, and then simply dragging it to the the right bar button item place in Interface Builder. Seeing as creating a UIBarButtonItem programmatically with the aforementioned UIButton as its 'custom view' (-initWithCustomView) has the same result, I believe this is what is happening as well.
What I don't understand is why the button image lost its nice edges and color gradient when I added it to the navigation bar wrapped in a bar button item. Can anyone tell me?
Thanks in advance.
The image hasn't changed. It is the same. Its just that when put on different backgrounds, it is showing differently. You should consider increasing the contrast.