I want to get the origin of scrollView in the window coordinate system. For Example, presently, scollView origin is (0,51). But in window coordinate system it should be 51 +
Note that these functions will only work after view controller finished laying out subviews. So if you want that when view loads, you can use viewDidLayoutSubviews / viewDidAppear, but not in viewDidLoad / viewWillAppear etc...
This code worked for me:
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
CGPoint originInSuperview = [self.view.superview convertPoint:CGPointZero fromView:self.scrollView];
}