How to put an image on UIActionSheet?

后端 未结 1 1752
傲寒
傲寒 2021-01-29 12:26

How to put image on UIActionSheet on right position of text. Like given in apple music player.

1条回答
  •  温柔的废话
    2021-01-29 12:32

    Don't answer with custom view

    Then you are effectively forbidding anyone to answer, because that is what you do.

    First of all, there is no such thing as UIActionSheet. It was deprecated four years ago. Today we use UIAlertController.

    UIAlertController is nothing but a prepackaged presented view controller. It does nothing that you could not do for yourself. It is also deliberately very simple and limited. So if you want to do something that goes beyond the limits what UIAlertController gives you, then you simply create a custom presented view controller. Adding the animation and "dimming view" to make it look like a standard action sheet is easy; just make a custom transition animation.

    That is what the interface shown in your screen shot is. It is not a UIActionSheet. It is not a UIAlertController. It's just a custom presented view controller that Apple has created. And so can you.

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