iOS开发>>>UIScrollView滚动条视图的使用

- (void)viewDidLoad {

     

UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];

     

scrollView.contentSize = CGSizeMake(847, 1129);//滚动条视图内容范围的大小

     

scrollView.showsHorizontalScrollIndicator = FALSE;//水平滚动条是否显示

scrollView.showsVerticalScrollIndicator = FALSE;//垂直滚动条是否显示

UIImage *image = [UIImageimageNamed:@"chart_847.gif"];

UIImageView *imageView = [[UIImageViewalloc] initWithImage: image];

[image release];

[scrollView addSubview:imageView];

[imageView release];

[self.view addSubview:scrollView];

[scrollView release];

 

[self.view bringSubviewToFront:toolBar];//添加一个工具栏

 }

你可能感兴趣的:(iOS开发>>>UIScrollView滚动条视图的使用)