【发布时间】:2014-07-25 15:55:22
【问题描述】:
我正在编写一个主从应用程序。单击表格行项目时,我将图像加载到具有 UIImageView 的 DetailViewController 中。我假设 UIImageView 是由应用程序实例化的,我只需要设置 UIImage。
imageView.image = UIImage(name:"camera")
然而,imageView 是 nil。我确定 imageView 与情节提要上的 UIImageView 链接。
@IBOutlet weak var imageView: UIImageView!
func configureView() {
if !imageView {
println("nilnilnil") // nilnilnil is printed...
}
}
【问题讨论】:
标签: swift