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