以编程方式将UIImage添加到ImageView非编程SWIFT中

时间:2015-11-14 14:07:28

标签: ios swift uiimage imageview

我有这个UIImage(A Gif)

let macacoGif = UIImage.gifWithName("macaco")

我在故事板上创建了这个ImageView

  @IBOutlet weak var fundo: UIImageView!

如何将此UIImage添加到ImageView中?

1 个答案:

答案 0 :(得分:2)

UIImageView有一个.image属性,您可以在其中设置UIImage:

fundo.image = macacoGif
相关问题