【问题标题】:How to check if there is an image present in the image view?如何检查图像视图中是否存在图像?
【发布时间】:2010-04-30 10:45:46
【问题描述】:

我是 iPhone 开发的新手。我想检查图像视图中是否存在图像的条件?我创建了一个图像视图,例如

UIImageView *subview = [[UIImageView alloc] initWithFrame:CGRectMake(10.0f, 6.0f,50.0f, 50.0f)];

如何检查图像是否存在于图像视图中?

【问题讨论】:

    标签: iphone uiimageview


    【解决方案1】:
    if (subView.image != nil)
       // image is present
    else
       // image missing
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-02-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多