我的漫畫書應用程序已啓動並正在運行,但缺少一些東西。從左到右滾動橫向和addSubView
1)我想讓圖像從左到右滾動,但我有應用程序在打開時自動將其自動設置爲橫向模式。我在哪裏調整這部分的應用程序?我有兩個我的圖像顯示...我在哪裏添加其他22個圖像在我的代碼中通過addSubView?在我的代碼中添加其他22個圖像通過addSubView?
// 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];
} [self layoutScrollImages]; //現在把串行佈局的照片滾動視圖
}
它基本上就像你在App Store中看到那些漫畫書應用程序。你滑動,然後進入下一頁。所以我很難以這種方式設置它。有任何想法嗎? – Dane 2009-08-06 05:36:28