0

iOS Simulator Screen shot Jun 19, 2013 2.43.43 PM.png!Main Storyboard description

Hblegg
  • 189
  • 2
  • 10

1 Answers1

1

This is really simple. In your collection view datasource methods, make sure you distinguish between the two views by keeping strong references to the views e.g. as properties:

if (collectionView == _topCollectionView) {
   // provide the data for the top view
}
else {
   // provide the data for the bottom view
}

Do the same in didSelectItemAtIndexPath. Determine which collection view has been interacted with, change the appropriate data in for the other one and reload and/or update your image view.

You need to use a standard view controller and add the delegate and datasource declarations manually.

@interface ViewController : UIViewController 
         <UICollectionViewDataSource, UICollectionViewDelegate>
Mundi
  • 79,884
  • 17
  • 117
  • 140
  • thank you. this worked with NSLog but did not populate the image view with the image from the plist. – Hblegg Jul 10 '13 at 05:59
  • Great. That means that updating the image view is a separate bug. You should accept the answer and ask a new question. – Mundi Jul 12 '13 at 09:34
  • Mundi, forgot to mark as answer. Thanks again for your help. Any input on the other question would be appreciated – Hblegg Jul 15 '13 at 21:21