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

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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.