Pintar cancel button en search bar

UIView *viewToGetCancelrButton = [self.mySearchBar.subviews objectAtIndex:0]; for (UIView *subView in viewToGetCancelrButton.subviews) { if ([subView isKindOfClass:[UIButton class]]) { UIButton *cancelButton = (UIButton *)subView; [cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [cancelButton setTitleColor:[UIColor whiteColor] forState:UIControlStateHighlighted]; } }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.