title: Property 'collectionView' and 'photos' not found
body: <p>So I have been using a book called "IOS in Action" for my programming and I have come across a few problems that I cannot figure out how to fix. The point of this is to have photos already in the Photos app show up in my Albums app using a viewController. The problems are:</p>
  
  <ol>
  <li>Property 'collectionView' not found on object of type 'IAPhotoCollectionViewCell*'</li>
  <li>Incompatible pointer types returning 'IAPhotoCollectionViewCell*' from a function with result type 'UICollectionView'</li>
  <li>Property 'photos' not found on object of type 'IAPhotoCollectionViewCell*'</li>
  </ol>
  
  <p>I am a newbie at programming so please explain why these are happening and how to fix them. Here is my code for IAPhotoCollectionViewcell.m</p>
  
  <pre><code>#import "IAPhotoCollectionViewCell.h"
  #import "IAAlbumPhotosViewController.h"
  
  @implementation IAPhotoCollectionViewCell
  
  - (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
      }
  return self;
  }  
  
  -(UICollectionView*)collectionView:(UICollectionView*)collectionView
              cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
      static NSString *CellIdentifier=@"photoCell";
      IAPhotoCollectionViewCell *cell = [self.collectionView dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
  
      ALAsset *asset = self.photos[indexPath.row];
      cell.imageView.image=[UIImage imageWithCGImage:asset.thumbnail];
  
      return cell;
  }
  @end
  </code></pre>
  
  <p>And here is my code for IAPhotoCollectionViewCell.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface IAPhotoCollectionViewCell : UICollectionViewCell
  @property (weak, nonatomic) IBOutlet UIImageView *imageView;
  
  @end
  </code></pre>
  
  <p>And also for the IAAlbumPhotosViewController.h </p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import &lt;AssetsLibrary/AssetsLibrary.h&gt;
  
  @interface IAAlbumPhotosViewController : UICollectionViewController
  @property (strong, nonatomic) IBOutlet UICollectionView *collectionView;
  @property (nonatomic, strong) ALAssetsGroup *album;
  @property (nonatomic, strong) NSMutableArray *photos;
  
  @end
  </code></pre>
  
  <p>Thank you!</p>
  
  <p>So I have tried using:</p>
  
  <pre><code>IAPhotoCollectionViewCell *cell = (IAPhotoCollectionViewCell*)[self.collectionView     dequeueReusableCellWithReuseIdentifier:CellIdentifier forIndexPath:indexPath];
  </code></pre>
  
  <p>but I have get a "Property 'collectionView' not found on object of type 'IAPhotoCollectionViewCell*' I will try adding a property 'collectionView'. So I found my problem was that I didn't have a @property section for 'collectionView' and an error went away. </p>