UIBarButton icon does not change when theme changes in iOS 13 - ios

I am facing an issue on iOS 13 where the UIBarButton icon does not change when I switch the iOS theme.
I have created two sets of images for dark and light themes and added them to xcassets as shown in the image below.
When I change the theme, the image of that theme doesn't reflect but if I tap on it then it changes.
Steps and screen recording.
Open VC1 in dark mode
Switch to light (icon should have black border)
Switch to dark (no change in icon)
Change to light (no change in icon)
Tap on icon, segue to VC2
VC2 shows its bar button with correct theme icon with black border
Tap on VC2 bar button
VC1 shows correct theme icon with black border
I tried creating new bar button and assign same icon without a segue. Icon doesn't change neither when theme changes not when i tap it.
below is screen recording.
What could be the reason?

Had the same problem today. Looks like you completed the first step (making sure you switch "Appearances" for the image set to "Any,Dark" or "Any, Light, Dark".
Turns out you need to set "Render As" to "Original". (See screenshot). Once I did this it worked.

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

When I drag a TabBarController into storyboard,the bottomBar doesen't display

as you can see,it displays a dark area.
how it can display icons,not a dark area?
Thank you for your answer
I had the problem till so you can change the colours like from above images. Just you can get the name of the tab bar items.
But when you are run it in device or simulator it should work.

Multiple tab bar icons are in selected state in iOS 7.1

In tab bar, only currently active item should be in blue colour. But in iOS 7, multiple item's image are in selected state (blue colour). Apart from iOS-7 i.e. iOS-8 and above, its working perfectly fine. PFA screenshot here
Check your image in storyboard where you have set, I think you have provide same image for both state, Selected and Normal. This should be your problem.
Provide different image for both, selected image under Tab Bar Item and image under Bar Item. See above image.
Also you can refer this link. How to change the tab bar image color for selected and unselected

UIDocumentInteractionController - Change background Color and prevent status bar popup

When I use the UIDocumentInteractionController it's background color is always white in the beginning and when I tap it, it gets black (and back when tapped again).
Can I somehow invert this or even set a custom background color for both modes?
Another interesting bug is that once I touch the screen the status bar (which I have disabled) pops back up. So white screen with document --> tap screen --> black background with status bar --> tap white screen withs status bar.
Once I dismiss that UIDocumentInteractionController, I disable the status bar again but it looks really ugly.
I've got the info.plist set up correctly with UIViewController-wise decided status bar appearence set to NO.

Reference iOS7 chevron back image for back button

Can you reference the builtin images of iOS7 like the blue background image chevron? I am adding a custom back button to my navigation bar, but the chevron is missing.

Resources