i am trying to create collectionView but it creates error as:
use of undeclared identifier in collectionView.
- (UICollectionView *)collectionView:(UICollectionView *)collectionView
               cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  UICollectionViewCell *cell =
      [collectionView dequeueReusableCellWithIdentifier:@"MyIdentifier"];
  if (cell == nil) {
    cell = [[UICollectionViewCell alloc] init];
    [UICollectionView setBackgroundColor:[UIColor redColor]];
  }
  [self.view addSubview:__collectionView];
  // Do any additional setup after loading the view, typically from a nib.
}