getting error while upgrading from swift 3 to swift 4. the error comes when using UICollection performBatchUpdates() method. My code looks something like this,
Class A: UICollectionViewDelegate {
@IBOutlet weak var collectionView: UICollectionView!
func someMethod() {
collectionView?.performBatchUpdates({ [weak self] _ in // error: Expression type '(_) -> _' is ambiguous without more context
self?.collectionView?.deleteItems(at: [IndexPath(item: 0, section: 0)])
}, completion: nil)
})
}
}