我的漫画书应用程序已启动并正在运行,但缺少一些东西。从左到右滚动横向和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