I've tried this.
if (crackerButton.center == CGPoint(190,135)) 开发者_如何学编程{
//Do something
}
Didn't work.
Any ideas?
Cheers Newbie
Use :
if(CGPointEqualToPoint(crackerButton.center, CGPointMake(190,135)))
{
//Do something
}
I take it you're making a Christmas app then?
if (crackerButton.center == CGPointMake(190, 135)) {
//Do something
}
Use the CGPointMake function to create a CGPoint.
if (crackerButton.center == CGPointMake(190, 135)) {
...
精彩评论