RNFrostedSidebar icon indicating copy to clipboard operation
RNFrostedSidebar copied to clipboard

To change the color of sidebar

Open InquirerMegamobileInc opened this issue 10 years ago • 1 comments

How can I change the sidebar color background? because i want to customize the color. thank you.

InquirerMegamobileInc avatar Jun 10 '14 03:06 InquirerMegamobileInc

In:

  • (instancetype)initWithImages: selectedIndices: borderColors:

Toward the beginning you should find the line: _tintColor = [UIColor colorWithWhite:0.2 alpha:0.73];

Change this from colorWithWhite to colorWithRed:green:blue: You can give these values between one and zero.

For example, this will give you a green sidebar: _tintColor = [UIColor colorWithRed:0 green:1 blue:0 alpha:0.73];

This will give you a pinkish/purplish sidebar: _tintColor = [UIColor colorWithRed:0.7 green:0 blue:0.3 alpha:0.73];

You can do the same thing for the backgrounds of your images using the code a few lines down: _itemBackgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.25];

SpenDM avatar Jul 20 '14 18:07 SpenDM