Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>There's a couple approaches you could take to do this. First off you could use a <code>UINavigationController</code> which allows you to easily move between multiple view controllers. This is probably the best option if you are okay with using multiple view controllers.</p> <p>To push to the next controller in a navigation stack you can use:</p> <pre><code>UIViewController *controller = [self.storyboard instantiateViewControllerWithIdentifier:@"someID"]; [self.navigationController pushViewController:controller animated:YES]; </code></pre> <p><code>UIScrollView</code> is also an option but would require careful manual memory management when items moved on and off screen, however this could be done all in one class.</p> <pre><code>[arrayOfViews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx,BOOL *stop) { UIView *subView = [[UIView alloc] initWithFrame:CGRectMake(320 * idx, 0, 320, 480)]; float randNum = arc4random() % 255; [subView setBackgroundColor:[UIColor colorWithRed:randNum/255.0 green:randNum/255.0 blue:randNum/255.0 alpha:1.0]]; [myScrollView addSubview:subView]; [myScrollView setContentSize:CGSizeMake(320 * (idx + 1), 480)]; }]; </code></pre> <p>Then your final and most flexible option would be to just make subviews of your main view and you could make your own custom animations for how every item moves around on screen.</p> <pre><code>[UIView animateWithDuration:0.5 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^{ [someSubview setTransform:CGAffineTransformConcat(CGAffineTransformMakeScale(0.5, 0.5), CGAffineTransformMakeTranslation(-300, -300))]; }completion:^(BOOL done){ //some completion items }]; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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