0

I have a UITableView Cell that contains a UIScroller that has a UIImage in it.

I am having an issue where by when I first load the view, everything looks OK, but when I scroll up and down it changes.

Here is a screen shot of before:

enter image description here

And here is one after I do a scroll:

enter image description here

My code that loads the UIImage in the UIScroller is:

UIImageView *imageview = [[UIImageView alloc] initWithImage:myImage];

        imageview.frame = self.scrollview.bounds;

        self.scrollview.delegate = self;

        [self.scrollview addSubview:imageview];

Can someone give me some pointers? I tried using code from the following stack overflow posts but they have not been able to do the trick so far:

UIImage Is Not Fitting In UIScrollView At Start UIScrollView with centered UIImageView, like Photos app

Any suggestions?

Thanks

Community
  • 1
  • 1
Strong Like Bull
  • 11,155
  • 36
  • 98
  • 169

1 Answers1

0

Setting the contentSize of your scrollview to the dimensions of your imageview might help.