Reputation: 11
I need to change only xoffset of my textfield on a particular event . I am writing the following line .
fileNametext.frame.origin.x = 300.0;
But I am getting the following error .
error: lvalue required as left operand of assignment
Can somebody please help me ? Thanks in advance .
Upvotes: 1
Views: 116
Reputation: 17598
Given that error, I'd say that 'x' is either an accessor method or a read-only property. Try what Josh said.
Upvotes: 0
Reputation: 6805
Try:
fileNametext.frame = CGFrameMake(300, fileNametext.frame.origin.y, fileNametext.frame.size.width, fileNametext.frame.size.height);
Upvotes: 3