Iphone 在横向和添加子视图中从左向右滚动

Iphone 在横向和添加子视图中从左向右滚动,iphone,xcode,horizontal-scrolling,Iphone,Xcode,Horizontal Scrolling,我的漫画书应用程序已启动并运行,但缺少一些东西 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;

我的漫画书应用程序已启动并运行,但缺少一些东西

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];
} [自布局滚动图像];//现在将照片以串行布局放置在scrollview中


}这取决于你想做什么。UIScrollView用于连续滚动-例如,如果您希望用户能够同时查看漫画图像1的右半部分和漫画图像2的左半部分

如果您真正想要的是在下一页/上一页范例中更离散地查看图像,那么您可能只需要在它们之间有单独的视图和动画-根本没有UIScrollView


如果你解释你真正想要的行为,我可以给你更多的细节。

也许这两个链接对你有帮助


它基本上就像你在应用商店里看到的那些漫画书应用。您轻扫,然后进入下一页。所以我很难用那种方式来设置它。有什么想法吗?看看黑马的《终结者:死亡谷1》,这正是我想要实现的。