开发者

How to put elements in UIScrollView?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜