Note that there are some explanatory texts on larger screens.

plurals
  1. POPass an array of images displaying in a UIImage to another different view controller
    primarykey
    data
    text
    <p>I come from JavaScript/HTML5 and I am beginning with Objective-C. </p> <p>I am creating a basic application using AVFramework where the user selects different types of frames (an Array in form of png images) to be displayed in their final picture.</p> <p>The app has 3 view controllers. One for shooting the picture, 2nd the one with an array of images(frames) to be displayed and the 3rd one with the final preview.</p> <p>What is the best approach for passing the tapped image to the final view controller after the picture is taken?</p> <p>My code that loads with frames in the frame view controller is below:</p> <pre><code>- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { static NSString *identifier = @"Cell"; TemplateViewCell *cell = (TemplateViewCell *)[collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath]; TemplateViewCell *frameImageViewCell = (TemplateViewCell *)[cell viewWithTag:100]; frameImageViewCell.frameImageView.image = [UIImage imageNamed: [frameImages[indexPath.section] objectAtIndex:indexPath.row]]; cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"photo-frame-2.png"]]; cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"photo-frame-selected.png"]]; return cell; } </code></pre> <p>I want the user to be able to tap on any of the images, move back to the 1st controller, snap the picture and then show the final picture in the last preview.</p>
    singulars
    1. This table or related slice is empty.
    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. 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