I have a defined a view on my controller called FirstView. I have this in my -(void)move method:
-(void)move
{
head = CGPointMake(head.center.x + X, head.center.y + Y);
}
I have already defined X and Y as integers and 'head' as a UIImage in my .h file. I get the error 'Property 'center' not found on object of type UIImage *' for the above line of code. Is there any way to change or cast this to UIImageView? I want to have UIImage because I am doing animations and drawing images on the view that I have defined. Quartzcore allows only UIImage and not UIImageView. So, what am I missing here?
It's not found because it's not there!! Center, bounds, and frame is only for views. Any animation you want can be done with using UIImageView so whatever you are trying to do above is not the right way. So, I would suggest reading https://developer.apple.com/library/ios/documentation/WindowsViews/Conceptual/ViewPG_iPhoneOS/AnimatingViews/AnimatingViews.html