0

I have an app where the user is submitting scavenger hunt images. They can optionally submit a second photo. I'm using two UIImageViews, both with default images in them. Tapping on them triggers the camera and if the user takes a photo, it will replace my default images. All that works as expected.

The next step is that the user can email these images. When I call my compose view, I want to detect if the default image is still in place for that optional second shot, and suppress it. I can't figure out how to detect if the default image is still assigned to the UIImageView or not and Google doesn't seem to want to give me the answer either.

Using Swift 4, how can I detect if the UIImageView is still displaying the default image or not?

DJFriar
  • 340
  • 7
  • 21
  • `if imageView.image == ` – Tamás Sengel Apr 25 '18 at 08:59
  • @the4kman Well now that I read your comment that seems obvious. lol. Thank you, this fixed it for me. Can you suggest it as an answer so I can give you credit and mark it as answered? – DJFriar Apr 26 '18 at 06:03
  • You welcome! It's a duplicate question and as a custom, we don't answer those on SO (or if we have a better answer, we write it under the duplicate instead). Since I don't consider my "answer" having that much value in it, I'd rather leave it as it is. – Tamás Sengel Apr 26 '18 at 10:38

0 Answers0