Buglife / Buglife-iOS

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

Feature: Invert Button Colors on Dark Background #13

Closed merktassel closed 8 years ago

merktassel commented 8 years ago

Our app's background is black, which makes the Buglife icon quite difficult to locate and use. Perhaps the icon colors could be inverted depending on how dark the background is?

schukin commented 8 years ago

This sounds reasonable... We'll see what we can do :)

schukin commented 8 years ago

Buglife 1.3.3 now includes an API for this, with one caveat - it is still a private experimental API. We want to be diligent with how we add new APIs to the Buglife SDK, and we're still thinking through customizability of the bug button.

For now, here's an example of how you can invert the bug button:

[[Buglife sharedBuglife] configureBugButtonWithForegroundColor:[UIColor blackColor] backgroundColor:[UIColor whiteColor]];

Also note that because it's a private API, you'll need to declare it so that the compiler can recognize it. (Typically you'll want to declare this in your AppDelegate.m, the same place where you initialize Buglife, and call the above method.)

@interface Buglife (PrivateStuff)
- (void)configureBugButtonWithForegroundColor:(nullable UIColor *)foregroundColor backgroundColor:(nullable UIColor *)backgroundColor;
@end