I have uicollectionview uicollectionview codes with CustomCollectionViewLayout , and inside there is a lot of small cells , but the user cannot see them without zoom . All cells are also available.
I want to add my collection view inside the zoom function!
My clear codes are below.
class CustomCollectionViewController: UICollectionViewController { var items = [Item]() override func viewDidLoad() { super.viewDidLoad() customCollectionViewLayout.delegate = self getDataFromServer() } func getDataFromServer() { HttpManager.getRequest(url, parameter: .None) { [weak self] (responseData, errorMessage) -> () in guard let strongSelf = self else { return } guard let responseData = responseData else { print("Get request error \(errorMessage)") return } guard let customCollectionViewLayout = strongSelf.collectionView?.collectionViewLayout as? CustomCollectionViewLayout else { return } strongSelf.items = responseData customCollectionViewLayout.dataSourceDidUpdate = true NSOperationQueue.mainQueue().addOperationWithBlock({ () -> Void in strongSelf.collectionView!.reloadData() }) } } } extension CustomCollectionViewController { override func numberOfSectionsInCollectionView(collectionView: UICollectionView) -> Int { return items.count } override func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { return items[section].services.count + 1 } override func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { let cell = collectionView.dequeueReusableCellWithReuseIdentifier(reuseIdentifier, forIndexPath: indexPath) as! CustomCollectionViewCell cell.label.text = items[indexPath.section].base return cell } override func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath cellForItemAtIndexPath: NSIndexPath) { print(items[cellForItemAtIndexPath.section].base) } }
Also my uicollectionview layout uicollectionview below you can see that I have selected maxZoom 4 , but doesnt have any effect!

Thanks!
source share