RMStepsController icon indicating copy to clipboard operation
RMStepsController copied to clipboard

Changing Background Color for RMStep hides Separators

Open anum90 opened this issue 10 years ago • 3 comments

I am changing colors for RMBarStep in the RMStep.m for disabled, enabled and selected bars. For example, For enabled bar:

  • (UIColor *)enabledBarColor { if(!_enabledBarColor) { self.enabledBarColor = [UIColor colorWithRed:46/255.0 green:174/255.0 blue:241/255.0 alpha:0.7]; }

    return _enabledBarColor; }

If I change color of the bar, separators are hidden. I guess because separators are layered below bar textlabel, that is why it is happening. If I lower the alpha value of bar background color, separators are better visible.

Alpha : 0.7

screen shot 2015-03-19 at 11 42 39 pm

Alpha 1.0:

screen shot 2015-03-19 at 11 43 32 pm

The separators are actually red colored here, shown blue due to blue color overlap.

As a work around, I tried to change the background color of RMStepBar to blue, and cleared the colors for individual steps. But still background color is very lightly visible, as if some white layer with lower alpha has been placed over steps.

screen shot 2015-03-19 at 11 46 03 pm

Please suggest me something to solve this issue. I have already taken one week. Thanks.

anum90 avatar Mar 19 '15 18:03 anum90

You are right: Seperators are disappearing when changing the enabled bar color to a color with alpha value 1. The RMStepsBar is a subclass of UIToolbar. I always wanted the blur effect of the toolbar to be visible and therefore I never used a solid enabled bar color. thus, I never saw the bug :)...

Let me see, if I can fix that bug. I hope I'll find the time to get this done ;).

For your workaround: As RMStepsBar is a subclass of UIToolbar, try to set the barTintColor instead of the background color.

CooperRS avatar Mar 19 '15 22:03 CooperRS

Hey Cooper, Thanks for quick response... I appreciate it. I tried setting tintcolor but it had not any special effects. So I decided to change parent class for RMStep to UIView and hola! Background colors for bar can be setup now and separators are visible! :D

Don't know why did you subclassed from UIToolbar. You can update your code to avoid this problem.

One last thing I would like to ask... How can I make shadow outline along with separators?

Again thanks for cooperation :)

anum90 avatar Mar 20 '15 17:03 anum90

Hi, sry, that you have to wait so long for a fix. I know what I need to fix, but I just don't find the time :/.

I'll keep you updated!

CooperRS avatar Apr 04 '15 13:04 CooperRS