title: Does UICollectionViewCell have a viewWillAppear or something I can pass data to
body: <p>I have this in my view controller:</p>
  
  <pre><code>- (UICollectionViewCell *) collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
  {
       CellSubclass *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"cellIdentifier" forIndexPath:indexPath];
  
       cell.dataObjects = data;
  
       return cell;
  }
  </code></pre>
  
  <p>In my CellSubclass.m I have:</p>
  
  <pre><code>- (id) initWithFrame:(CGRect)frame
  {
      // You can call initWithFrame: method here as our base constructor of the UIView super class
      self = [super initWithFrame:frame];
  
      if (self)
      {
          // call functions that need access to data but data is nil
      }
  
      return self;
  }
  </code></pre>
  
  <p>So in the lifecycle of my view controller, the CellSubclass gets called immediately before the data is ready. Is there a function like viewWillAppear or something that I can pass the data too?  How can I call a function from my view controller other than initWithFrame?  Can I pass the data in other ways?</p>
  
  <p>Thanks.</p>