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.
精彩评论