In order for CGTAMasterViewController's dequeueImageCellForIndexPath:ofCollectionView: method to return an instance of CGTAFlagCollectionViewCell rather than UICollectionViewCell, it must be able to import a header file which contains that class. By moving the definition to the .h file, it will return this stronger type.