开发者

how can we use the coordinates of an image

开发者 https://www.devze.com 2023-03-15 20:10 出处:网络
I\'m on xcode And I have an image that is created everytime we open the application, I want to use its coordinates to calculate some stuff. But I don\'t know how can I use them, I think that it is som

I'm on xcode And I have an image that is created everytime we open the application, I want to use its coordinates to calculate some stuff. But I don't know how can I use them, I think that it is something like

CGPoint(x;y) 
开发者_运维百科

or

int x = (x of the image) 

and

int y= (y of theimage). 

How can i do this please ?


To get the origin of a UIImageView, just use:

int x = imageView.frame.origin.x;
int y = imageView.frame.origin.y;

Or:

CGPoint origin = imageView.frame.origin;
0

精彩评论

暂无评论...
验证码 换一张
取 消