Created
February 16, 2010 08:22
-
-
Save abi/305391 to your computer and use it in GitHub Desktop.
This file contains 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
//Photo1.jpg is in the Resources folder | |
CGRect frame = CGRectMake(0, 0, 200, 200); | |
UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:frame]; | |
frame = CGRectMake(0, 0, 500, 500); | |
UIImageView *myImageView = [[UIImageView alloc] initWithFrame:frame]; | |
[myImageView setImage:[UIImage imageNamed:@"photo1.jpg"]]; | |
[scrollView addSubview:myImageView]; | |
scrollView.contentSize = CGSizeMake(500, 500); | |
[mainView addSubview:scrollView]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment