在iphone中显示safari浏览网页历史动画

时间:2011-06-10 06:35:45

标签: iphone

我需要在我的视图控制器上从左到右显示图像,就像我们在safari浏览器中滚动网页一样......有没有人开发过这个东西...... 谢谢,

1 个答案:

答案 0 :(得分:0)

这可能对你有帮助..

 UIScrollView * scrollView=[[UIScrollView alloc]init];

for(int i=0;i<imageCount;i++)
{
 UIImageView *tempView=[[UIImageViewalloc]initWithFrame:CGRectMake((i*60),05,60,70)];
 tempView.image=[UIImage imageNamed:@"images.jpg"];
 [scrollView addSubview:tempView]; 
} 

    scrollView.frame=CGRectMake(0, 20, 320, 80);
scrollView.contentSize=CGSizeMake(60*imageCount,70);
    scrollView.delegate=self;
    [self.view addSubview:scrollView];
相关问题