图片加载问题

时间:2016-07-07 01:01:52

标签: ios swift uiimageview uiimage

每当我调用它时,图像仍然显示为空白,就像它是零一样。我是否错误地设置了图片?请帮忙。感谢。

   var image = cell.viewWithTag(101) as! UIImageView
    var title = cell.viewWithTag(102) as! UILabel
    var record = cell.viewWithTag(103) as! UILabel




   image.image = todo.image

       // image = UIImageView(image: newImage)

    if image.image == nil{
        print("nilish")
        image = UIImageView(image: UIImage(named: "EmptyProfile.png"))
    }


    image.image = todo.image
    if image.image == nil{
        image.image = UIImage(named: "EmptyProfile.png")
    }

0 个答案:

没有答案