0
votes

I'm trying to develop a component of UICollectionView or UICollectionViewController which I can use multiple time in my current project and also can be used anywhere by simply copy-pasting whole folder.

Requirements: - Create an Xib of either UICollectionView or UICollectionViewController (which one is easier). - Embed that CollectionView xib in my UIViewController, In my that UIViewController there are some graphs and also some pics that I've to show(collection view is for that). - Basically I want to send a JSON file and some parameter if needed to that component and make the collection view running within that View controller.

I'm facing a lot of problems embedding both of UICollectionView and UICollectionViewController so what should be the best way and proper approach to do it?

1
Could you explain what you have tried so far so we could find out what is going wrong ? - Marwen Doukh
I've tried to develop UICollectionViewController in Xib but I found it very hard to implement inside another View controller's UIView. - vivek agravat

1 Answers

0
votes

You could use a container view to embed a view controller inside another view controller.

This is from Apple documentation:

Container view controllers are a way to combine the content from multiple view controllers into a single user interface