I am using JSQMessagesViewController to add chat functionality to my app. Inside a UIViewController, I initialised a JSQMessagesCollectionView thus:
JSQMessagesCollectionView *jsq = [[JSQMessagesCollectionView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height)];
[self.view addSubview:jsq];
This however, is giving me this error:
'NSInvalidArgumentException', reason: 'UICollectionView must be initialized with a non-nil layout parameter'
How would I include the view inside my view controller? A brief explanation would be much appreciated.