SlidingContainerViewController
SlidingContainerViewController copied to clipboard
Collection View :swift
Hi,can i add collection view ? I would be happy to hear from you .
Tell me how to add collection view. I will wait for you.
Hi, sure you need to add in your content controller.
Thank you for replaying I would be happy to help me
fatal error: unexpectedly found nil while unwrapping an Optional value
func viewControllerWithColorAndTitle (_ color: UIColor, title: String) -> UIViewController { let vc = UIViewController ()
vc.view.addSubview(collectionView)
return vc
}
I want to add collection view to vc1, vc2, vc3, vc4.
let slidingContainerViewController = SlidingContainerViewController (
parent: self,
contentViewControllers: [vc1, vc2, vc3, vc4],
titles: ["First", "Second", "Third", "Forth"])
self.view.addSubview(slidingContainerViewController.view)