Buglife/Buglife-iOS

Feature: Invert Button Colors on Dark Background

merktassel opened this issue · 2 comments

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?

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

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