设置UIActionsheet的delegate,同时实现以下方法
-(void)willPresentActionSheet:(UIActionSheet*)actionSheet
{
SELselector =NSSelectorFromString(@"_alertController");
if([actionSheetrespondsToSelector:selector])//ios8 以后采用UIAlertController来代替uiactionsheet和UIAlertView
{
UIAlertController*alertController = [actionSheetvalueForKey:@"_alertController"];
if([alertControllerisKindOfClass:[UIAlertControllerclass]])
{
alertController.view.tintColor= [UIColorblackColor];
}
}
}