title: iOS - Add multiple UIButton inside UIScrollView not scrolling smoothly
body: <p>I'm adding (400+) <code>UIButton</code>s in <code>UIScrollview</code>, When I scrolls in <code>simulator</code> its working well, but in iPad its scrolling slowly.</p>
  
  <p><a href="http://mocku.ps/ga24n5" rel="nofollow">Here's</a> what I'm doing.</p>
  
  <blockquote>
  <pre><code>- (void)viewDidLoad {
  [scrollView setContentSize:CGSizeMake(180 * 24 , 22 * 40 + 200)];
  for (int e=0; e&lt;12; e++) {
      for(int i=0;i&lt;24;i++)
      {
          UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
          btn.titleLabel.font = [UIFont systemFontOfSize:12.0f];
          [btn setBackgroundColor:[UIColor colorWithRed:248.0/255.0 green:248.0/255.0 blue:248.0/255.0 alpha:1]];
  
  
          CALayer *layer = btn.layer;
          layer.cornerRadius = 5.f;
          layer.masksToBounds = YES;
          layer.borderWidth = 1.f;
          layer.borderColor = [[UIColor colorWithRed:190.0/255.0 green:190.0/255.0 blue:190.0/255.0 alpha:1] CGColor];
  
          CGRect rect = btn.frame;
          rect.size.height = 40;
          rect.size.width = 50;
          rect.origin.x =  100 * i;
          rect.origin.y = 40 * e;
          btn.frame = rect;
  
          CAGradientLayer *shineLayer = [CAGradientLayer layer];
          shineLayer.frame = layer.bounds;
          shineLayer.colors = [NSArray arrayWithObjects:
                               (id)[UIColor colorWithWhite:0.9f alpha:0.5f].CGColor,
                               (id)[UIColor colorWithWhite:0.9f alpha:0.7f].CGColor,
                               (id)[UIColor colorWithWhite:0.9f alpha:1.f].CGColor,
                               (id)[UIColor colorWithWhite:0.9f alpha:1.f].CGColor,
                               (id)[UIColor colorWithWhite:0.9f alpha:1.f].CGColor,nil];
          [layer addSublayer:shineLayer];
  
          UILabel *lblDes = [[UILabel alloc] initWithFrame:CGRectMake(0,0,50,40)];
          lblDes.backgroundColor = [UIColor clearColor];
          lblDes.numberOfLines = 3;
          lblDes.textColor = [UIColor colorWithRed:4.0/255.0 green:106.0/255.0 blue:200.0/255.0 alpha:1];
          lblDes.textAlignment = UITextAlignmentCenter;
          lblDes.text = @"adf";
          lblDes.tag = -1;
          lblDes.font = [UIFont systemFontOfSize:11.f];
  
          [btn addSubview:lblDes];
          [scrollView addSubview:btn];
      }
  }
  [super viewDidLoad];  // Do any additional setup after loading the view, typically from a nib. }
  </code></pre>
  </blockquote>