我的漫画书应用程序已启动并正在运行,但缺少一些内容。
1)我想让图像从左到右滚动,但我让应用程序在打开时自动设置为横向模式。我在哪里调整应用程序的这一部分?(顺便说一句......它在纵向模式下从左到右)
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];
} [自我布局滚动图像]; // 现在将照片以串行布局放置在滚动视图中
}