我的代码如下:
UISearchBar *searchBar;
- (IBAction)next:(UIButton *)sender {
searchBar.userInteractionEnabled=false;
searchBar.alpha =0;
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Cot" bundle: nil];
CotViewController *someViewController = [storyboard instantiateViewControllerWithIdentifier:@"Cot"];
[self.navigationController pushViewController:someViewController animated:YES];
}
代码工作正常,但是当我进行一次推送并返回到第一个UIViewController
属性searchBar.userInteractionEnabled=false;
完美运行
,但其他财产
searchBar.alpha =0;
不起作用,因为它看起来像alpha = 1
出什么问题了?谢谢。