Change Text Color of Items in UIActionSheet - iOS 8

前端 未结 9 1422
星月不相逢
星月不相逢 2020-11-29 02:26

I had been using following code to change text color of items which I add in UIActionSheet.:

- (void)willPresentActionSheet:(UIActionSheet *)act         


        
9条回答
  •  不知归路
    2020-11-29 02:56

    For Swift you can do like this

        let alertAction = UIAlertAction(title: "XXX", style: .default) { (action) in
    
         }
    
        alertAction.setValue(UIColor.red, forKey: "titleTextColor")
    

提交回复
热议问题