xcode - get UIButton inside an UIScrollView absolute screen location -


it may dum question, can't find answer ...

i have uiscrollview , inside number of uibuttons. when press button, want know screen location of button. if use button.frame gives me position inside uiscrollview, normal.

how can find x , y relative screen of button pressed?

thanks in advance.

your objection right- instead, use

- (cgpoint)convertpoint:(cgpoint)point toview:(uiview *)view 

from uiview, like

[button.superview convertpoint:button.frame.origin toview:nil]; 

not tested, believe should work. see iphone - position of uiview within entire uiwindow


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -