【发布时间】:2011-11-28 20:16:54
【问题描述】:
我正在尝试获取主视图控制器的子视图中的 UIButton 的坐标。我可以使用下面的代码将它们相对于子视图返回,但是如何返回与主视图控制器相关的 UIButton 位置?
ScrollingAppDelegate *appDelegate = (ScrollingAppDelegate *)[[UIApplication sharedApplication] delegate]; CGPoint canXY = appDelegate.globalcanButtonReference.frame.origin; NSLog(@"%f %f",canXY.x,canXY.y);
【问题讨论】:
标签: iphone objective-c ios cocoa-touch uiviewcontroller