-1
基本上,觸摸屏圖像應顯示在觸摸位置但不起作用。在用戶觸摸位置放置圖像
-(void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [[event allTouches] anyObject];
CGPoint location = [touch locationInView:touch.view];
UIImage *image = [[UIImage alloc]initWithContentsOfFile:@"BluePin.png"];
[image drawAtPoint:CGPointMake(location.x, location.y)];
}
UIViewImage不存在 – Aptlymade
哎呀對不起是匆忙寫代碼我現在改變了它所以不應該有任何問題的任何更多:D –