Okay, so I'm developing my own personal xkcd app (I friggin' love that comic). As some of you may know, the creator made a JSON script with the newest comic for ease of use. I have successfully parsed that and, when I use a UIImageView, can show the semi-daily comic. Because of the change of comic size and lack of maneuverability, however, I wanted to transfer this image to a UIScrollView. I thought it would be as simple as adding the imageView as a subview of the scrollView, but the image never actually shows up when that happens! Here's my code... (I have the IBOutlet and properties declared in the .h file, so that's not the problem)
I tried adding the "tempImageView" directly as a subview as well, but still no results! What could be happening here?
Code:
UIImageView *tempImageView = [[UIImageView alloc] initWithImage:imager]; // imager is the actual image
self.imageView = tempImageView;
[tempImageView 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];
I tried adding the "tempImageView" directly as a subview as well, but still no results! What could be happening here?