In my app I am checking to see whether a post has a picture or not.
For this I am using:
if pictures[string]? != nil {
if var image: NSData? = pictures[string]? {
imageView.image = UIImage(data: image!)
}
}
However, it still comes up with the error:
fatal error: unexpectedly found nil while unwrapping an Optional value.
I'm sure it is something easy to fix but I am quite new to this - what am I doing wrong?