iOS 改变UIActionSheet标题的颜色
#pragma mark - UIActionSheetDelegate
- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
UIButton *buttonLast = [[actionSheet subviews] lastObject];
NSLog(@"%@", buttonLast.titleLabel.textColor);
[buttonLast setTitleColor:[UIColor colorWithRed:0.992 green:0.278 blue:0.168 alpha:1] forState:UIControlStateNormal];
UIButton *buttonFir = [[actionSheet subviews] objectAtIndex:1];
NSLog(@"%@", buttonFir.titleLabel.textColor);
[buttonFir setTitleColor:[UIColor colorWithRed:0 green:0.478 blue:1 alpha:1] forState:UIControlStateNormal];
}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。