-(void)willPresentActionSheet:(UIActionSheet *)actionSheet
{
SEL selector = NSSelectorFromString(@"_alertController");
if ([actionSheet respondsToSelector:selector])//ios8
{
UIAlertController *alertController = [actionSheet valueForKey:@"_alertController"];
if ([alertController isKindOfClass:[UIAlertController class]])
{
alertController.view.tintColor = [UIColor grayColor];
}
}
else//ios7
{
for( UIView * subView in actionSheet.subviews )
{
if( [subView isKindOfClass:[UIButton class]] )
{
UIButton * btn = (UIButton*)subView;
[btn setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
}
}
}
}