I have used Interface Builder to draw a simple UI with a scrollview, in viewDidLoad I am reading off the x, y, width and height of scrollview's frame CGRect property like this:
NSLog(@"x=%f,y=%f,w=%f,h=%f",self.detailScrollView.frame.origin.x,self.detailScrollView.frame.origin.y,self.detailScrollView.frame.size.width,self.detailScrollView.frame.size.height);
(offcourse previously properly @syntheized everything and I have correct IBOutlets etc..)
but when I look at the readoffs and compare them to the interface builder values I am little bit confused about the y coordinate, everything else (x,width,height) is OK.
This is the output from NSLog:
2012-08-06 15:52:40.481 xxxxx[1471:207] x=20.000000,y=147.000000,w=280.000000,h=293.000000
But the actual values from the interface builder for the scrollview are: X=20 Y=59 Width=280 Height=293 (sorry I cannot post screencapture).
Any hints why the y value is offset by 88 ? (147 in NSLog minus 59 in interface builder) Thanks
viewDidLoadthe frame which will be displayed, that might be either the orientation change, autoresizing or something else that is not processed beforeviewDidLoadis called. - A-Live