Image not showing on iOS8

Hello,

would someone be able to help me with this code please?

The image welldone.png shows a blank text field since the iOS8 upgrade?

The game plays levels and runs like this:

Audio plays: "Place dog on chair." > User drags dog on chair > Audio plays: "You got it right. Well done." > SMS alert shows image: blank text field shows, but should show the image welldone.png.


Here's the code. Sorry for no code tags, but I wasn't sure how to add this on this forum.


- (IBAction)showMessage:(id)sender { UIImage *backgroundImage = [UIImage imageNamed:@"welldone.png"]; self.message = [[KLPAAlert alloc] initWithImage:backgroundImage text:@"Well Done"]; [[SimpleAudioEngine sharedEngine] preloadEffect:@"gotitright.mp3"]; [[SimpleAudioEngine sharedEngine] playEffect:@"gotitright.mp3"]; [self.message show]; [self.view addSubview:self.nextButton]; [self performSelector:@selector(hideAlert) withObject:nil afterDelay:2.0]; }


Set a breakpoint and inspect the value of your backgroundImage variable. If it contains a valid image, then you will have to look at whatever that KLPAAlert class is. It's not an Apple framework class so you probably won't get any support here.


If the image is *not* loaded correctly, then you'll have to look at the build settings and make sure the filename matches exactly (including case), and that it's being copied to the app target in the Copy Bundle Resources build phase. (Or if it's in an asset catalog, make sure the name matches - you might not want that ".png" suffix.)

Thank you.

Well, the image welldone.png shows on the Xcode screen when I navigate to Xcode > Project navigator > Project name > Classes > Graphics > Interface Graphics > welldone.png.


I set a breakpoint in KLPAViewController.m > line 209 > UIImage *backgroundImage = [UIImage imageNamed:@"welldone.png"]; > I'm not sure how to look for the value of the background variable?

I see the Debug area at the bottom and a load of data.

Image not showing on iOS8
 
 
Q