Note that there are some explanatory texts on larger screens.

plurals
  1. POUIScrollView in different versions - iOS
    text
    copied!<p>I'm working on a UIScrollView in iPad. The Scroll view scrolls smoothly in iOS 5.0 ,but the animation of scrolling is not smoother in Versions below 5.0.</p> <p>Is there any specific customization be done to handle this?Should I add some more functionality to run UIScrollView in iOS 4.x?</p> <p>-- I am facing this problem when adding custom UIView into the UIScrollView.</p> <p>Working Code :</p> <pre><code>{ timeLineScrollView.frame = CGRectMake(0, 0, 500, 500); float posX = 0; for(int i = 0;i &lt; 10;i++) { UIView *samView = [[UIView alloc]initWithFrame:CGRectMake(posX, 10, 500, 300)]; posX = posX + 500; [timeLineScrollView addSubview:samView]; } timeLineScrollView.contentSize = CGSizeMake(500*10, timeLineScrollView.frame.size.height); } </code></pre> <p>Not Working Code :</p> <pre><code> { timeLineScrollView.frame = CGRectMake(0, 0, 500, 500); float posX = 0; for(int i = 0;i &lt; 10;i++) { CustomView *samView = [[CustomView alloc]initWithFrame:CGRectMake(posX, 10, 500, 300)]; posX = posX + 500; [timeLineScrollView addSubview:samView]; } timeLineScrollView.contentSize = CGSizeMake(500*10, timeLineScrollView.frame.size.height); } </code></pre> <p>The Custom View :</p> <pre><code>- (id)initWithFrame:(CGRect)frame withEvent:(VisitHistoryEvent*)eventDetails { self = [super initWithFrame:frame]; if (self) { complaint = [[UILabel alloc]init]; } return self; } -(void)layoutSubviews { complaint.frame = CGRectMake(0, 0, 100, 20); [self addSubview:complaint]; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload