UINavigationController 内でこのコードを使用しようとしています:
http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/Intro.html
絵コンテで:
- PageViewController を Navigation Controller に埋め込みます。
- Topbar を「NavigationBar」に変更します。
- NavigationBar に "ImageView" というタイトルを追加します。
- PageViewController と NavigationController にストーリーボード ID を追加します。
ImageViewScrollView.m で:
- (void)displayTiledImageNamed:(NSString *)imageName size:(CGSize)imageSize
この行を変更します:
_zoomView = [[UIImageView alloc] initWithFrame:(CGRect){CGPointZero, imageSize }];
これらによって:
CGPoint navPoint = CGPointMake(0, 45);
_zoomView = [[UIImageView alloc] initWithFrame:(CGRect){navPoint, imageSize}];
そして、これらの行も変更します:
- (CGPoint)minimumContentOffset
{
return CGPointZero;
}
これらによって:
- (CGPoint)minimumContentOffset
{
CGPoint navPoint = CGPointMake(0, 45);
return navPoint;
}
また、iOS シミュレーターを使用すると、navigationBar が表示されません。CGPointZero を置き換えるだけでは不十分です。
どうしたの ?