Buglife / Buglife-iOS

Awesome bug reporting for iOS apps
Apache License 2.0
509 stars 63 forks source link

BugLife barTintColor doesn't seem to be working #22

Closed rickvdl closed 7 years ago

rickvdl commented 7 years ago

Hi,

I'm trying to give the bug reporter's navigation bar a barTintColor, but I can't seem to get it working. I am using the following code for updating the appearance:

let appearance = Buglife.shared().appearance
appearance.tintColor = UIColor.red
appearance.barTintColor = Colors.black
appearance.titleTextAttributes = [NSForegroundColorAttributeName : UIColor.red]
appearance.statusBarStyle = .lightContent
Buglife.shared().invocationOptions = [.screenshot]
Buglife.shared().start(withAPIKey: Constants.kBugLifeAPIKey)        

Using the following code I expect the navigationbar to be black with red textlabels. But this is the result:

simulator screen shot 19 mar 2017 19 40 15

Any idea on what I'm doing wrong? Thanks in advance

schukin commented 7 years ago

Are you using UINavigationBar's appearance proxy anywhere in your application code to change its background image? (i.e. UINavigationBar.appearance().setImage(for:))

rickvdl commented 7 years ago

I do, I am setting the background to an empty UIImage to hide the bottom divider.

Op 19 mrt. 2017 om 20:42 heeft Dave Schukin notifications@github.com het volgende geschreven:

Are you using UINavigationBar's appearance proxy anywhere in your application code to change its background image? (i.e. UINavigationBar.appearance().setImage(for:))

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

schukin commented 7 years ago

Gotcha. In that case, this appears to be a bug in Buglife SDK. (Oh, the irony...)

We'll release an update tomorrow with a fix for this. :) However, if you require a fix immediately, you can work around this issue by setting the background image to nil specifically for Buglife navigation bars:

let buglifeNavBarType = NSClassFromString("LIFENavigationBar") as! UINavigationBar.Type
buglifeNavBarType.appearance().setBackgroundImage(nil, for: .default)
buglifeNavBarType.appearance().setBackgroundImage(nil, for: .compact)
rickvdl commented 7 years ago

Thanks for the quick response! Tomorrow should be fine, thanks for the snippet though!

Cheers

Op 19 mrt. 2017 om 21:05 heeft Dave Schukin notifications@github.com het volgende geschreven:

Gotcha. In that case, this appears to be a bug in Buglife SDK. (Oh, the irony...)

We'll release an update tomorrow with a fix for this. :) However, if you require a fix immediately, you can work around this issue by setting the background image to nil specifically for Buglife navigation bars:

let buglifeNavBarType = NSClassFromString("LIFENavigationBar") as! UINavigationBar.Type buglifeNavBarType.appearance().setBackgroundImage(nil, for: .default) buglifeNavBarType.appearance().setBackgroundImage(nil, for: .compact) — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

schukin commented 7 years ago

This issue has been resolved in Buglife v1.5.3. Cheers!