获取控件在屏幕的相对坐标实现代码:io
UIWindow * window=[[[UIApplication sharedApplication] delegate] window];view
CGRect rect=[view convertRect: view.bounds toView:window]; //获取控件view的相对坐标vi