In Xcode 5.0.2, I created a universal application and dragged a UIScrollViewand UIImageView(from its “View Mode” changed to “Top Left”) into the storyboards of the iPhone and iPad (here full screen mode ):

In an attempt to make it UIScrollViewfill the entire screen, I added 4 restrictions (here full screen mode ):

Then in ViewController.m I try:
- Download
board.png(copyright Wikipedia Commons, Denelson83) - Give
UIImageViewthe same dimensions asboard.png - Set
contentSizefor UIScrollViewthe same size.
Here is the source code:
- (void)viewDidLoad
{
[super viewDidLoad];
UIImage *img = [UIImage imageNamed:@"board"];
NSLog(@"%s: (%f x %f)", __PRETTY_FUNCTION__, img.size.width, img.size.height);
_imageView.image = img;
_imageView.frame = CGRectMake(0, 0, img.size.width, img.size.height);
}
- (void)viewDidLayoutSubviews
{
[super viewDidLayoutSubviews];
_scrollView.contentSize = _imageView.bounds.size;
}
- (void) willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
[super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration];
_scrollView.contentSize = _imageView.bounds.size;
}
Here's the conclusion:
Scroll[3464:70b] -[ViewController viewDidLoad]: (1000.000000 x 961.500000)
, 2 :
1:
iPhone iPad- ( Cmd - ) - :


2:
, :

1:
iphonic (!), deviceOrientationDidChange, - :
Scroll[702:70b] -[ViewController viewDidLoad]: image size = {1000, 961.5}
Scroll[702:70b] -[ViewController deviceOrientationDidChange:]: view size = {1000, 961.5}
Scroll[702:70b] -[ViewController deviceOrientationDidChange:]: view size = {1000, 961.5}
Scroll[702:70b] -[ViewController deviceOrientationDidChange:]: view size = {1000, 961.5}
( _imageView.image.size, , _imageView.size 100 x 100 sotryboards):
- (void)viewDidLoad
{
[super viewDidLoad];
UIImage *img = [UIImage imageNamed:@"board"];
NSLog(@"%s: image size = %@", __PRETTY_FUNCTION__, NSStringFromCGSize(img.size));
_imageView.image = img;
_imageView.frame = CGRectMake(0, 0, img.size.width, img.size.height);
[[NSNotificationCenter defaultCenter]
addObserver:self
selector: @selector(deviceOrientationDidChange:)
name: UIDeviceOrientationDidChangeNotification
object: nil];
}
-(void)deviceOrientationDidChange:(NSNotification *)notification
{
_scrollView.contentSize = _imageView.image.size;
NSLog(@"%s: view size = %@", __PRETTY_FUNCTION__, NSStringFromCGSize(_imageView.image.size));
}