0
我试图获取在mainviewcontroller的子视图中的UIButton的坐标。我可以使用下面的代码相对于子视图返回它们,但是如何返回与mainviewcontroller相关的UIButton位置?从UIButton获取位置坐标
ScrollingAppDelegate * appDelegate =(ScrollingAppDelegate *)[[UIApplication sharedApplication] delegate]; CGPoint canXY = appDelegate.globalcanButtonReference.frame.origin; NSLog(@“%f%f”,canXY.x,canXY.y);
这伟大的工作,感谢了一堆我真的很感激:) – user973984