Last active
August 29, 2015 14:14
-
-
Save blixt/adb0ee12197dc87755da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set up main content area. | |
UIView *contentView = [[UIView alloc] initWithFrame:scrollView.bounds]; | |
contentView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; | |
contentView.backgroundColor = [UIColor whiteColor]; | |
[scrollView addSubview:contentView]; | |
self.scrollViewContentView = contentView; | |
// Put a label in the scroll view content area. | |
UILabel *label = [[UILabel alloc] initWithFrame:CGRectInset(contentView.bounds, 10, 0)]; | |
label.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; | |
[self.scrollViewContentView addSubview:label]; | |
self.scrollViewLabel = label; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment