改变UIActionSheet button字体颜色

实现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];
        }
    }
}

 

猜你喜欢

转载自duchengjiu.iteye.com/blog/2082505
今日推荐