Yalantis / FoldingTabBar.iOS

Folding Tab Bar and Tab Bar Controller
https://yalantis.com
MIT License
3.68k stars 458 forks source link

Tab Bar Extra Item and Main Button Change Color to Blue on UIalertviewController appearance #61

Closed imanodaysoffdotcom closed 7 years ago

imanodaysoffdotcom commented 8 years ago

Whenever i open up a uialertcontroller the color of the middle button and extra buttons change to blue.

I set the color in the app delegate and do not change it throughout the entire app so it's strange this is happening

serejahh commented 8 years ago

hi @imanodaysoffdotcom

I presented an alert and nothing happened: simulator screen shot 30 aug 2016 10 38 55

Could you provide some details?

imanodaysoffdotcom commented 7 years ago

Notice the menu button color

Before img_1010

During img_1012

After

img_1011

imanodaysoffdotcom commented 7 years ago

i tried to change the profile picture which produced the menu you see in the 2nd screenshot

serejahh commented 7 years ago

Thanks for the screenshots. I'l investigate the issue

serejahh commented 7 years ago

What property do you change in the app delegate? I've created a branch: https://github.com/Yalantis/FoldingTabBar.iOS/tree/feature/61. Please, pull it, run and select a row in the chat

imanodaysoffdotcom commented 7 years ago

in my app delegate here is my setuop function. I do not make any changes to the folding tab bar throughout the app

func setupCustomTabBar() { tabBarController = self.window?.rootViewController as! YALFoldingTabBarController

    let item1: YALTabBarItem = YALTabBarItem(itemImage: UIImage(named: "Home"), leftItemImage:  UIImage(named: "SynchronizeFilled"), rightItemImage: UIImage(named: "Meeting-Non-Filled"))

    //UIImage(named: "UninstallingUpdates") - upload lst pymt btn
    let item2: YALTabBarItem = YALTabBarItem(itemImage: UIImage(named: "Donate"), leftItemImage: nil, rightItemImage: nil)
    tabBarController.leftBarItems = [item1,item2]

    let item3: YALTabBarItem = YALTabBarItem(itemImage: UIImage(named: "KGS4.png"), leftItemImage: UIImage(named: "edit_icon"), rightItemImage: UIImage(named: "SynchronizeFilled"))
    let item4: YALTabBarItem = YALTabBarItem(itemImage: UIImage(named: "settings_icon"), leftItemImage: nil, rightItemImage: nil)

    tabBarController.rightBarItems = [item3, item4]

    tabBarController.centerButtonImage = UIImage(named: "plus_icon")
    tabBarController.selectedIndex = 0

    //customize tabBarView
    tabBarController.tabBarView.backgroundColor = UIColor.livoBeigeColor()
    tabBarController.tabBarView.tabBarColor = UIColor.livoOrangeColor()
    tabBarController.tabBarView.dotColor = UIColor.whiteColor()

    tabBarController.tabBarView.extraTabBarItemHeight = YALExtraTabBarItemsDefaultHeight
    tabBarController.tabBarView.tabBarViewEdgeInsets = YALTabBarViewHDefaultEdgeInsets
    tabBarController.tabBarView.tabBarItemsEdgeInsets = YALTabBarViewItemsDefaultEdgeInsets
    tabBarController.tabBarView.offsetForExtraTabBarItems = YALForExtraTabBarItemsDefaultOffset
    tabBarController.tabBarView.extraTabBarItemHeight = YALExtraTabBarItemsDefaultHeight

    //Denzel Edit
    yalTabBarHeight = YALTabBarViewDefaultHeight
    //End of Denzel Edit

}
serejahh commented 7 years ago

Please, give a me link to a demo project

IgorMuzyka commented 7 years ago

@imanodaysoffdotcom did you set UIAppearance for UIView somewhere in your code? especially the tintColor value. If yes then it's the source of your problem. You can fix this by setting appearance rule for the main button or for case when it contained in it's container.

imanodaysoffdotcom commented 7 years ago

Thanks for the suggestion. Would you happen to have sample code for that. Is this a foldingTabBar specific hack ?

Sent from my iPhone

On Nov 7, 2016, at 9:24 AM, Igor Muzyka notifications@github.com wrote:

@imanodaysoffdotcom did you set UIAppearance for UIView somewhere in your code? especially the tintColor value. If yes then it's the source of your problem. You can fix this by setting appearance rule for the main button or for case when it contained in it's container.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

IgorMuzyka commented 7 years ago

@imanodaysoffdotcom nope that's not something specific for folding tab bar, but as you may notice navigation items had the same color as the main button thats why i had such an assumption about tint color.

imanodaysoffdotcom commented 7 years ago

So i just decided to change the background color back to the original after the alert controller is dismissed. Thanks for your help.