dimanche 25 janvier 2015

Error while loading image on device (swift)

I got this error:



fatal error: unexpectedly found nil while unwrapping an Optional value



when I tried to run my app on a device.


The error come from this line :



self.viewFond.backgroundColor = UIColor(patternImage: UIImage(named: "pierre.png")!)


It's working great on the simulator but not in the device. I understand that it can't find the image but I don't understand why.




Aucun commentaire:

Enregistrer un commentaire