修改actionsheet字体颜色

2018-05-23  本文已影响4人  yezi1989

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

        }

    }

}

上一篇下一篇

猜你喜欢

热点阅读