I'm developing iPad app using SplitView.
And I put UIScrollView in DetailView by using Interface Builder.
Then I add IBOutlet UIScrollView scrollView;
in detailViewController.h that was automatically created by Xcode.
And connected this scrollView to UIScrollView in DetailView.xib .
And I added below code to DetailViewController.m .
- (void)viewDidLoad {
[super viewDidLoad];
UIImageView *tempView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"test.jpg"]];
self.imageView = tempView;
[tempView release];
scrollView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height);
scrollView.maximumZoomScale = 4.0;
scrollView.minimumZoomScale = 0.75;
scrollView.clipsToBounds = YES;
scrollView.delegate = self;
[scrollView addSubView:imageView];
[imageView release];
}
I think by add this code, scrollable image is shown in detailView. But nothings appear.
Please teach me how to display UIScrollView in detailView.