control swipe direction only on right swipecellkit

 Problem:

I want to enable only the left swipe not right swipe in swipecellkit.How to achieve that?


Solution:

    func collectionView(_ collectionView: UICollectionVieweditActionsForItemAt indexPath: IndexPathfor orientation: SwipeCellKit.SwipeActionsOrientation) -> [SwipeCellKit.SwipeAction]? {

        guard orientation == .right else { return nil }

}


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift