美文网首页
修改actionsheet字体颜色

修改actionsheet字体颜色

作者: yezi1989 | 来源:发表于2018-05-23 10:18 被阅读4次

设置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];

        }

    }

}

相关文章

网友评论

      本文标题:修改actionsheet字体颜色

      本文链接:https://www.haomeiwen.com/subject/fwoljftx.html