added red color to negative counter
This commit is contained in:
parent
1e39bed3f0
commit
797f345b37
2 changed files with 8 additions and 2 deletions
|
@ -87,7 +87,13 @@
|
|||
}
|
||||
|
||||
-(void)controlTextDidChange:(NSNotification *)aNotification {
|
||||
[counter setIntValue: 140 - [[textField stringValue] length]];
|
||||
NSInteger c = 140 - [[textField stringValue] length];
|
||||
[counter setIntValue:c];
|
||||
if(c < 0) {
|
||||
[counter setTextColor:[NSColor redColor]];
|
||||
} else {
|
||||
[counter setTextColor:[NSColor controlTextColor]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Reference in a new issue