Add image to alert view

后端 未结 5 1788
鱼传尺愫
鱼传尺愫 2021-02-02 12:08

I have an alert view that pops up when the user press the add button. How do i add an image to the alert view?

I added some code that i took reference from stack overfl

5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-02 12:38

    Swift 4:

    var imageView = UIImageView(frame: CGRect(x: 220, y: 10, width: 40, height: 40))
    imageView.image = <#yourImage#>
    alert.view.addSubview(imageView)
    

提交回复
热议问题