I want to have an UIImageView in an UIScrollView. But I it doesn’t show any picture when I load it. My code looks like this in my viewController in the function viewDidLoad:
UIImage *image = [UIImage imageNamed:@"plan.gif"];
imageView = [[UIImageView alloc] initWithImage:image];
scrollView = [[UIScrollView alloc] init];
[scrollView addSubview:imageView];
scrollView.contentSize = image.size;
[self updateUI];
In my didFinishLaunchingWithOptions:
TestAppViewController *tavc = [[TestAppViewController alloc] init];
[self.window addSubview:tavc.view];
1) Check that your image name
@"plan.gif"is correct. Double-check.2) Init your
UIImageViewwith a frame and add the image later.