當我使用setTitle: forState:
方法設置我的按鈕的標題時,有淡出和淡入效果。當我設置按鈕標題時,有淡入淡出效果
- (void)respondsToTextField:(UITextField *)sender {
if ([sender.text isEqualToString:@""]) {
[_cancleOrConfirmButton setTitle:@"Cancel" forState:UIControlStateNormal];
}else {
[_cancleOrConfirmButton setTitle:@"Search" forState:UIControlStateNormal];
}
}
如何解決?