ios - UIActionsheet button 颜色
大家讲道理
大家讲道理 2017-04-17 15:32:05
0
3
839

UIActionsheet button 颜色

用这种方式 不好使, 显示actionSheet.subviews 为空
for (id obj in actionSheet.subviews) {

    if ([obj isKindOfClass:[UIButton class]]) {

        UIButton *btn=(UIButton *)obj;

        [btn setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];

    }
}
大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

全員に返信(3)
巴扎黑

リーリー

このメソッドが showInView の後に呼び出されることを確認してください。showInView の前に呼び出された場合は、キャンセル ボタンを除くすべてのボタンが色付けされます。

いいねを押す +0
刘奇

UIButton *button = [UIButton buttonWithType:UIButtonTypeSystem];
[ボタン setTittleColor...];

いいねを押す +0
刘奇

[[UIView の外観] setTintColor:[UIColor redColor]];

注: ビューの色が変更されるため、アラートのクリックが消えた後にビューの色を復元する必要があります。 リンクの説明

いいねを押す +0
人気のチュートリアル
詳細>
最新のダウンロード
詳細>
ウェブエフェクト
公式サイト
サイト素材
フロントエンドテンプレート