4
我一直在将CGPoint转换为字符串时遇到问题。我尝试了各种方法,但这似乎是最有前途的,但它仍然无法工作。有什么建议么?将CGPoint转换为字符串的问题
这里是我的代码:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
coord = [touch locationInView:touch.view];
viewcoord.text = [NSString stringWithFormat:@"coordinates %@", coord.x, coord.y];
我得到的输出,但它只是说, “坐标(空)” 我不明白为什么...
感谢