In application,I want to add collection view in xib and want to reuse it in different controllers.I tried but xib did not allowed to add collection view it only add cells..??
Asked
Active
Viewed 524 times
-3
-
Show your code please. – Usman Javed Sep 12 '17 at 07:33
-
I have created separate xib for collection view and i want use collection view cell in that collection so created another xib for collection view cell so how can i call cell in collection view – Rutuja Pawal Sep 12 '17 at 07:42
1 Answers
0
In most of the cases it is a challangeing task to make a ViewController reusable since different ViewControllers have to interact with different views which may have different behaviour, we mainly focus on making views reusable using xib as much as possible. So the conclusion is it is preferred to use xib file for reusable cells not for ViewControllers just to reuse here and there. What you can do is use xib file for viewcontrollers instead of keeping refernce in storyboard.

laxman khanal
- 998
- 1
- 8
- 18
-
u r right...but in our case it is not possible to add 15-20 collection views on each page..it must be quite lengthy process to add each collection view everytime – Rutuja Pawal Sep 12 '17 at 07:54