Alex Rivera | Logout

Set starting point of content size for UIScrollView

Asked 2011-09-06T10:21:22.047
12

How do I set the starting point of a UIScrollView? I would like to add a UIImageView left of the UIScrollView but changing the contentSize only adds scrolling room to the right of the scrollview. How do I add an ImageView left of the scrollView's (0,0) point and make it part of the scrollview's content size?

Edit
Report

1 Answer

3

Actually the best solution to start in the middle of the scroller if you are in a iPhone you should

[scroller setContentOffset:CGPointMake(320, 0)];
[self.view addSubview:scroller];

And for iPad

[scroller setContentOffset:CGPointMake(1024, 0)];
[self.view addSubview:scroller];
answered 2012-06-14T18:02:02.053

Your Answer