天天看点

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 = [uiimage imagenamed:@"chart_847.gif"];

uiimageview *imageview = [[uiimageview alloc] initwithimage:

image];

[image release];

[scrollview addsubview:imageview];

[imageview release];

[self.view addsubview:scrollview];

[scrollview release];

[self.view bringsubviewtofront:toolbar];//添加一个工具栏

 }

下一篇: 图片去色