ISHHoverBar icon indicating copy to clipboard operation
ISHHoverBar copied to clipboard

how can I set the color of the bar?

Open Sweeper777 opened this issue 9 years ago • 6 comments

I want to set the color of the bar. I tried setting the backgroundColor property but it doesn't work as I intented:

bar.backgroundColor = UIColor.greenColor()
screen shot 2016-08-24 at 12 52 24 pm

It seems that the bar is translucent. And there are little green triangles sticking out.

How can I set the background of the bar to UIColor.greenColor()?

Sweeper777 avatar Aug 24 '16 11:08 Sweeper777

Hi @Sweeper777,

right now you can only change the UIVisualEffect used for the backing view. The reason is that we use a UIVisualEffectView as the backing view for the bar. Will keep the issue open, to see if there is interest in setting a backgroundcolor.

Kind regards,

Felix

felixLam avatar Aug 24 '16 12:08 felixLam

If you need this feature urgently you can fork this and change the background view: https://github.com/iosphere/ISHHoverBar/blob/master/ISHHoverBar/ISHHoverBar.m#L200

Simply set it to a UIView with the desired background color.

felixLam avatar Aug 24 '16 12:08 felixLam

Thanks.

Sweeper777 avatar Aug 24 '16 13:08 Sweeper777

would it be possible to set a "selected state" for a UIBarButtonItem in the toolbar?

cragun avatar Sep 21 '16 15:09 cragun

Hi @cragun, thanks for bringing this up. I believe that right now the different states of the bar button item are not supported. Will definitely look into that as well.

felixLam avatar Oct 05 '16 14:10 felixLam

hello @cragun I have created a separate issue for this https://github.com/iosphere/ISHHoverBar/issues/13

felixLam avatar Oct 05 '16 14:10 felixLam