title: UICollectionView Appearing Blank
body: <p>I am trying to use a UICollectionView but I am having a lot of issues. I have a UIViewController with a UICollectionView inside. I have setup all the delegates correctly along with the UILabel in the CVcell. The view appears and is white as defined in the code. The NSLog sends out all the cells and the text that should be there but in the actual UICollectionView it is blank and nothing appears apart from the scroll view. I have tried everything but cannot seem to get this working correctly. The cell is 187 x 187 taking up half the screen size with a label in the middle. I will post the code below.</p>
  
  <p>Thanks</p>
  
  <p><a href="https://i.stack.imgur.com/Ec48K.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ec48K.png" alt="Delegate"></a></p>
  
  <pre><code>#import "StudentControllerMain.h"
  #import "CVcell.h"
  
  
  
  @interface StudentControllerMain ()
      @property (nonatomic, strong) IBOutlet UICollectionView *collectionView;
      @property (nonatomic, strong) NSArray *dataArray;
  
  
  @end
  
  @implementation StudentControllerMain
  
  
  
  
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
      NSMutableArray *firstSection = [[NSMutableArray alloc] init];
  
  
      for (int i=0; i&lt;5; i++) {
          [firstSection addObject:[NSString stringWithFormat:@"Cell %d", i]];
      }
  
      self.dataArray = [[NSArray alloc] initWithObjects:firstSection, nil];
  
  
  
  
      [self.collectionView registerClass:[CVcell class] forCellWithReuseIdentifier:@"CVcell"];
  
  
      // Configure layout
  
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      self.collectionView = nil;
      self.dataArray = nil;
      // Dispose of any resources that can be recreated.
  }
  -(UIStatusBarStyle)preferredStatusBarStyle{
      return UIStatusBarStyleLightContent;
  }
  
  /*
  #pragma mark - Navigation
  
  // In a storyboard-based application, you will often want to do a little preparation before navigation
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
      // Get the new view controller using [segue destinationViewController].
      // Pass the selected object to the new view controller.
  }
  */
  
  
  
  
  -(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
      return [self.dataArray count];
  }
  
  -(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
  
      NSMutableArray *sectionArray = [self.dataArray objectAtIndex:section];
      return [sectionArray count];
  
  
  }
  
  -(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
  
      // Setup cell identifier
      static NSString *cellIdentifier = @"CVcell";
      CVcell *cell = (CVcell *)[collectionView dequeueReusableCellWithReuseIdentifier:cellIdentifier forIndexPath:indexPath];
      NSMutableArray *data = [self.dataArray objectAtIndex:indexPath.section];
      NSString *cellData = [data objectAtIndex:indexPath.row];
      NSLog(cellData);
      [cell.title setText:cellData];
      [cell.title setTextColor:[UIColor blackColor]];
  
      return cell;
  
  }
  
  
  @end
  </code></pre>