开发者

How to put elements in UIScrollView?

开发者 https://www.devze.com 2023-03-31 05:08 出处:网络
In my Project i wanna put in scrollview uiimageview and uitextview(or uilabel).But the size of scrollview must be smaller then iphone screen(only height) How can i make that if i scroll down, the imag

In my Project i wanna put in scrollview uiimageview and uitextview(or uilabel).But the size of scrollview must be smaller then iphone screen(only height) How can i make that if i scroll down, the imageview go up and text scroll(the amount of text about 200 lines)?

 - (void)viewDidLoad
 {
     [super viewDidLoad];
     [scroll setScrollEnabled:YES];
     [scroll setContentSize:CGSizeMake(320,开发者_开发技巧 5000)];
 }


Use - (void)scrollRectToVisible:(CGRect)rect animated:(BOOL)animated method of scrollview and pass rectangle you want to make visible.

0

精彩评论

暂无评论...
验证码 换一张
取 消