摘要: 首先找8张jpg的图片,将它的名字分别设置为01.png......08.jpg,然后将代码运行,就可看见效果- (void)viewDidLoad{ [superviewDidLoad]; _scrollView = [[UIScrollViewalloc]init]; //设置scrollview的可视范围 _scrollView.frame = CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height); //1.创建UIImageView用来显示在UIScrollView上 CGFloa... 阅读全文
posted @ 2013-11-27 22:41 nx的封装 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 由于注释写的比较全面,在这我就把原码拿过来了。- (void)viewDidLoad{ [superviewDidLoad]; //1.创建scrollview UIScrollView *scrollView = [[UIScrollViewalloc]init]; [self.view addSubview:scrollView]; //2.创建imageview 将imageview添加到scrollview上进行显示,因为scrollview上不能显示图片 NSString *imageName = [NSStringstringWithFormat:@"big.jpg&qu 阅读全文
posted @ 2013-11-27 19:31 nx的封装 阅读(222) 评论(0) 推荐(0) 编辑