私のコミックブックアプリは起動していますが、いくつか欠落しています。左から右にスクロールして風景を表示し、addSubView
1)画像を左から右にスクロールしたいのですが、開けたときにアプリが自動的にランドスケープモードに設定されています。どこでアプリのこの部分を調整するのですか? (btw ...ポートレートモードで左から右に向かっています)
2)私の画像が2枚表示されています... addSubViewを使ってコード内に他の22枚の画像をどこに追加しますか?
// load all the images from our bundle and add them to the scroll view
NSUInteger i;
for (i = 1; i <= kNumImages; i++)
{
NSString *imageName = [NSString stringWithFormat:@"image%d.jpg", i];
UIImage *image = [UIImage imageNamed:imageName];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
// setup each frame to a default height and width, it will be properly placed when we call "updateScrollList"
CGRect rect = imageView.frame;
rect.size.height = kScrollObjHeight;
rect.size.width = kScrollObjWidth;
imageView.frame = rect;
imageView.tag = i; // tag our images for later use when we place them in serial fashion
[scrollView1 addSubview:imageView];
[imageView release];
} [自己layoutScrollImages]。 //今scrollview
}それは本当にあなたが何をしたいかによって異なり
そのを助けます。スワイプして次のページに進みます。だから、私はそのように設定するのは苦労している。何か案は? – Dane
「ターミネーター:ダース・バレー#1」をチェックアウトし、達成しようとしていることを正確に確認します。 – Dane