0

the code is:

if(CGRectIntersectsRect(icon1.frame, pig.frame) && icon1.image == [UIImage        imageNamed:@"BerryBlueberryIphone.png"]){

}

the code works in ipad but not iphone. spelling is correct for png file i can't seem to find out why it does not work. it was working before on all devices but i don't know if after updating Xcode there my be a setting affecting the line of code.

if more info is needed please let me know. would really like to figure this out today.

meno
  • 21
  • 3
  • Try breaking the `if` into pieces and debugging which part isn't what you think it should be. – Phillip Mills Jan 14 '15 at 02:14
  • && icon1.image == [UIImage imageNamed:@"BerryBlueberryIphone.png"] Is the part of the code that makes it invalid. Without it it works fine but I need it to recognize the image in the view. It was working now on iphone it doesn't but on the ipad it does. Any ideas why? – meno Jan 14 '15 at 03:35
  • I have put more info on this question. Please take a look at it, any help will be great. http://stackoverflow.com/questions/27930828/collision-not-working-on-iphone-just-ipad-xcode-6-1-1 – meno Jan 14 '15 at 03:37

0 Answers0