So me and my buddy have been working on an app. We have an ImageView embedded inside a ScrollView. It worked on iOS 5, but now we are updating it to iOS 7. We now have to use autolayout to make it look the app look nice again. But this disables scrolling it. We've attempted for a while to add code that allows the image to be scrollable again but nothing has helped.
We've tried everything under the sun we could find dealing with viewDidLoad (where we were originally doing it for iOS 5) and viewDidAppear (What we added to conform to iOS 7 and better practicality standards). Any suggests would be appreciated, we've exhausted every attempt.
@property (weak, nonatomic) IBOutlet UIScrollView *Scroll;
@property (weak, nonatomic) IBOutlet UIImageView *Image;
...
- (void)viewDidLoad
{
[super viewDidLoad];
// This is what we did for iOS 5
//self.Scroll.contentSize = self.Image.image.size;
//self.Image.frame = CGRectMake(0, 0, self.Image.image.size.width, self.Image.image.size.height);
}
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
//One of the many NEW attempts for iOS 7
self.Scroll.contentSize = CGSizeMake(self.Image.image.size.width,self.Image.image.size.height);
}