0
보유하고있는 .text
값에 따라 UILabel의 색상을 변경하려고합니다.보유하고있는 텍스트를 기준으로 레이블 색상 변경
나는이 마련했지만 작동하지 않는 것 :
titel.text = [NSString stringWithFormat:@"%@", titelJSON];
if (titel.text == @"PROBLEEM") {
titel.textColor = [UIColor redColor];
NSLog(@"1: %@", titel.textColor);
} else if (titel.text == @"WAARSCHUWING") {
titel.textColor = [UIColor orangeColor];
NSLog(@"2: %@", titel.textColor);
} else {
titel.textColor = [UIColor blackColor];
NSLog(@"3: %@", titel.textColor);
}
어떤 생각을?
if
진술 내용을 실제로 볼 수 있도록 로그인했습니다.
tnx! 그것을 해결했다. – Roeliee