0
点赞
收藏
分享

微信扫一扫

改变UIActionSheet button字体颜色

腾讯优测 2022-08-07 阅读 72


实现UIActionSheet 的代理

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet;  // before animation and showing view

 

- (void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
for (UIView *subViwe in actionSheet.subviews) {
if ([subViwe isKindOfClass:[UIButton class]]) {
UIButton *button = (UIButton*)subViwe;
[button setTitleColor:[UIColor colorWithHexString:BLUE_GREEN_COLOR]forState:UIControlStateNormal];
}
}
}

 

举报

相关推荐

0 条评论