Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To change the color of sidebar #32

Open
InquirerMegamobileInc opened this issue Jun 10, 2014 · 1 comment
Open

To change the color of sidebar #32

InquirerMegamobileInc opened this issue Jun 10, 2014 · 1 comment

Comments

@InquirerMegamobileInc
Copy link

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

@SpenDM
Copy link

SpenDM commented Jul 20, 2014

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];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants