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

Please avoid constant colors #17

Closed
yurkins opened this issue Apr 13, 2014 · 0 comments
Closed

Please avoid constant colors #17

yurkins opened this issue Apr 13, 2014 · 0 comments
Assignees
Labels

Comments

@yurkins
Copy link

yurkins commented Apr 13, 2014

In my project textfields backgroundColor is transparent,
tintColor is a custom color.
Disabled state is a custom color...

You can put blocks events and / or delegate methods developers can write logic for their cases. Maybe someone doesn't need to be white/red background or display a message in case a field has invalid value ...

Please review methods:

//********************************************************************
(void)setup {
if ([self respondsToSelector:@selector(setTintColor:)])
[self setTintColor:[UIColor blackColor]];
...
}

//********************************************************************
(BOOL) validate{
self.backgroundColor = [UIColor colorWithRed:255 green:0 blue:0 alpha:0.5];
...
[self setBackgroundColor:[UIColor whiteColor]];
...
}

//********************************************************************
(void)setNeedsBackground
{
if (!_enabled)
[self setBackgroundColor:[UIColor lightGrayColor]];
}

@mehfuzh mehfuzh added the bug label Apr 14, 2014
@mehfuzh mehfuzh self-assigned this Apr 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants