let imageViewSaoYiSao = UIImageView(image:UIImage(named:"saoyisao.PNG"))
imageViewSaoYiSao.frame = CGRect(x:325, y:0, width:50, height:60)
self.view.addSubview(imageViewSaoYiSao)
这样的代码,我认为一切都很好,但是,显示此错误,我不知道为什么。谢谢您的时间。
答案 0 :(得分:0)
尝试一下
let imageViewSaoYiSao = UIImageView(image: UIImage(named: "YourImageName"))
imageViewSaoYiSao.frame = CGRect(x:325, y:0, width:50, height:60)
self.view.addSubview(imageViewSaoYiSao)