Iphone Cgpoint
xcode: Lvalue required as left operand assignment help!!?
Well i am new to iPhone development and I’m only 14 so speak easily but basically i have this code in my .m file:
@synthesize player;
-(void) touchesBegan:(NSSet*)touches withEvent: (UIEvent*)event{
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
int xpoint = location.x;
player.center.x=xpoint;
}
_________end of code_________
And in my . h file:
@interface runningViewController : UIViewController {
IBOutlet UIImageView *player;
}
@property (nonatomic, retain) UIImageView *player;
@end
_________end of code_________
Then when i click Build and Run the following error comes up:
Lvalue required as left operand of assignment
Can anyone help me please?
As soon as possible?
This is my first question so please help me.
I need an example
An Lvalue (L for Left) is a value on the left hand side of an assignment operator (=). It must be a variable. Since you didn’t specify the associated line, that is the best that I can do.
iPhone Programming – UIImageView: Creating a Drag-able Image