Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

nashyo

macrumors 6502
Original poster
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
 
Not looking at the site, I know ray wenderlich, but think to your self.
When is self. used? is it a property? or is it an ivar?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.