iOS Uiscrollview zoom code

nashyo

macrumors 6502
Original poster
Oct 1, 2010
299
0
Bristol
I've found this code on Ray Wenderlich

UIScrollView *scrollView;

Code:
CGRect scrollViewFrame = self.scrollView.frame;
CGFloat scaleWidth = scrollViewFrame.size.width / self.scrollView.contentSize.width;
CGFloat scaleHeight = scrollViewFrame.size.height / self.scrollView.contentSize.height;
Why isn't scrollviewframe.size.width written self.scrollview.scrollviewframe.size.width?

Source:
Code:
http://www.raywenderlich.com/10518/how-to-use-uiscrollview-to-scroll-and-zoom-content