[right setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor redColor]} forState:UIControlStateDisabled];
这样设置了 Disabled 时候的颜色
但是
self.navigationItem.rightBarButtonItem.enabled=NO 后
依然是灰色的
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
应该使用
参照UIBarItem.h里面的
这两个方法是Appearance protocol的方法。
应该是调用方法的时间点上有问题,这个是我的demo代码片段