簡體   English   中英

讀取x,y像素觸摸過的iPad / iPhone?

[英]read x,y pixel touched ipad/iphone?

無論如何,只要將手/手指放在屏幕上(iphone / ipad),就可以檢測到您正在觸摸哪些像素? 本質上是繪制我的手的形狀(不像指紋那樣詳細)。

謝謝。

如果您正在尋找觸摸的坐標點,請使用以下代碼。

- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {

        UITouch *touch = [touches anyObject];
        CGPoint currentTouchPosition = [touch locationInView:self.view];
        NSLog(@"%f,%f",currentTouchPosition.x,currentTouchPosition.y);
    }

不幸的是,您想要實現的目標是不可能的。 當前的設備最多只能將11個觸摸檢測為 (本文中的更多信息 )。 無法獲得真實的觸摸區域或真實的觸摸像素。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM