1. 程式人生 > >iOS 設定UIActionSheet 按鈕顏色

iOS 設定UIActionSheet 按鈕顏色

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet {

    for (UIView *view in actionSheet.subviews) {

        if (view.tag == 1) {

            UIButton *button = (UIButton *) view;

//            [button setImage:[UIImage imageNamed:@"註冊2.jpg"] forState:UIControlStateNormal];

            [button

setTitleColor:[UIColorredColor] forState:UIControlStateNormal];

            [button setSelected:YES];

        }

    }

}