I am trying to use this code inside an UINavigationController :
http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html
In storyboard :
- I embed PageViewController in Navigation Controller.
- I change Topbar to "NavigationBar".
- I add a title : "ImageView" to NavigationBar.
- I add a storyboard id to PageViewController and NavigationController.
In ImageViewScrollView.m :
- (void)displayTiledImageNamed:(NSString *)imageName size:(CGSize)imageSize
I change this line :
_zoomView = [[UIImageView alloc] initWithFrame:(CGRect){CGPointZero, imageSize }];
By these :
CGPoint navPoint = CGPointMake(0, 45);
_zoomView = [[UIImageView alloc] initWithFrame:(CGRect){navPoint, imageSize}];
And I change these lines too :
- (CGPoint)minimumContentOffset
{
return CGPointZero;
}
By these :
- (CGPoint)minimumContentOffset
{
CGPoint navPoint = CGPointMake(0, 45);
return navPoint;
}
And I don't see navigationBar when I use iOS Simulator. Replacing CGPointZero is not enough.
What's wrong ?