Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/44.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/17.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
iPhone:如何获取UIView的左上角坐标?_Iphone_Objective C_Cocoa Touch - Fatal编程技术网

iPhone:如何获取UIView的左上角坐标?

iPhone:如何获取UIView的左上角坐标?,iphone,objective-c,cocoa-touch,Iphone,Objective C,Cocoa Touch,我只想得到视图左上角的x,y坐标,我该怎么做? 谢谢 这是左下--->CGPoint topfleft=theView.frame.origin 左上角是: CGPoint topfleft=theView.frame.origin+theView.frame.height知道如何获取visibleMapRect的角坐标吗?@Jonathan Grynspan self.frame.SKScene的原点位于左下角。 CGPoint topLeft = theView.frame.origin;

我只想得到视图左上角的x,y坐标,我该怎么做? 谢谢

这是左下--->
CGPoint topfleft=theView.frame.origin

左上角是:


CGPoint topfleft=theView.frame.origin+theView.frame.height

知道如何获取visibleMapRect的角坐标吗?@Jonathan Grynspan self.frame.SKScene的原点位于左下角。
CGPoint topLeft = theView.frame.origin;