BaseUICollectionViewCell
open class BaseUICollectionViewCell: UICollectionViewCell, UIViewControllerPreviewingDelegate, BaseView
BaseUICollectionViewCell is a subclass of UICollectionViewCell and implements BaseView and UIViewControllerPreviewingDelegate. This class should be used for the collection view cells throughout the project.
-
Holds data of the Collection View Cell.
Declaration
Swift
open var data:Any?
-
Overridden method to setup/ initialize components.
Declaration
Swift
override open func awakeFromNib()
-
This method should be called in cellForRowAt:indexPath. it also must be overriden in all sub classes of BaseUICollectionViewCell to update the collection view cell’s content.
Parameter
Parameter data: Cell DataDeclaration
Swift
open func updateData(_ data:Any?)Parameters
dataCell Data
-
Protocol method for viewControllerForLocation (CGPoint)
- Parameters:
- previewingContext: UIViewControllerPreviewing
- location: Location for view controller
Returns
returns view controller for location - nil by defaultDeclaration
Swift
open func previewingContext(_ previewingContext: UIViewControllerPreviewing, viewControllerForLocation location: CGPoint) -> UIViewController?Parameters
previewingContextUIViewControllerPreviewing
locationLocation for view controller
Return Value
returns view controller for location - nil by default
- Parameters:
-
Protocol method for viewControllerToCommit
- Parameters:
- previewingContext: UIViewControllerPreviewing
- viewControllerToCommit: ViewController to commit
Declaration
Swift
open func previewingContext(_ previewingContext: UIViewControllerPreviewing, commit viewControllerToCommit: UIViewController)Parameters
previewingContextUIViewControllerPreviewing
viewControllerToCommitViewController to commit
- Parameters:
View on GitHub
BaseUICollectionViewCell Class Reference