How can i customize UIAlertAction in UIAlertController for iOS8?

前端 未结 1 1915
攒了一身酷
攒了一身酷 2020-12-18 01:32

I need to add image in Action sheet item using UIAlertController. I add using:

UIImage *image = [UIImage imageNamed:@\"icon.png\"];
[alertAction         


        
相关标签:
1条回答
  • 2020-12-18 02:11

    Well, here is the Runtime Header file for UIAlertAction. You can neither change the frame of image nor you can change the height of Cancel button.

    So what is the solution?

    The only solution that I could figure is to make a custom view with UIVisualEffect and show/animate it like UIActionSheet. Basically you need to imitate UIActionSheet.

    That said, I would like to welcome other solutions as well.

    0 讨论(0)
提交回复
热议问题