0

I have noticed a strange behaviour after running my iPhone app on iOS8 device using Xcode 6.0.1. I have noticed that few images are failing to load and all these images are placed under reference folders. And loading images by calling imageNamed@"/pathoftheimage/someimage.png" is failing to get the exact path. For now we are able to get the correct path when we fetch the path using mainBundle path for resource(absolute path). Could anyone tell us how and what changes are to be done to make the existing code work in ios8 also. So that i dont need to change all the image paths in my project.

ravoorinandan
  • 783
  • 2
  • 10
  • 26
  • You will have to provide a lot more detail if you want someone to help you. – Adis Oct 27 '14 at 11:43
  • Have a try. `UIImage *image = [UIImage imageNamed:@"pathoftheimage/someimage.png"];` – KudoCC Oct 28 '14 at 07:12
  • @KudoCC thats the one currently i am using in my project and its stopped fetching images from iOS8 onwards but its working fine in iOS7 – ravoorinandan Oct 28 '14 at 07:14
  • The parameter of `imageNamed:` is a name, so it is undefined if you pass a relative path to it. So why not place your image file in the main bundle ? – KudoCC Oct 28 '14 at 07:18
  • Found a answer in the below mentioned link and it works fine. http://stackoverflow.com/questions/25971349/xcode-6-ios-8-uiimage-imagenamed-from-bundle-issue – ravoorinandan Oct 29 '14 at 09:18

0 Answers0