I try to put the value of lastPointX into a label text, but doesn't work. In the Interface Builder, I create two labels, the label for "x" value and the label for "y" value. Please If anyone knows the solution, please answer the question.
Thanks.
This is the code and the error.
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch = [touches anyObject];
lastPoint = [touch locationInView:self.view];
CGFloat lastPointX = lastPoint.x;
CGFloat lastPointY = lastPoint.y;
labelx.text == lastPointX; // <----- error: Semantic Issue: Invalid operands to binary expression ('NSString *' and 'CGFloat' (aka 'float'))
}