Extensions

The following extensions are available globally.

  • Common array extensions used in this project

    See more

    Declaration

    Swift

    struct Array<Element> : CollectionType, MutableCollectionType, _DestructorSafeContainer
  • A popular binary search implementation

    See more

    Declaration

    Swift

    protocol CollectionType : Indexable, SequenceType
  • Adds instantiation with the enum-ed name of an Asset Catalog image

    See more

    Declaration

    Swift

    class UIImage : NSObject, NSSecureCoding
  • Simplifies registering & dequeuing UICollectionViewCell and UICollectionReusableView classes & nibs.

    Sample usage:

    class ImageCollectionViewCell: UICollectionViewCell {}
    
    collectionView.registerClass(ImageCollectionViewCell.self)
    
    func collectionView(collectionView: UICollectionView,
                        cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
        let cell: ImageCollectionViewCell = collectionView.dequeueReusableCell(forIndexPath: indexPath)
        // ...
        return cell
    }
    
    
    See more

    Declaration

    Swift

    class UICollectionView : UIScrollView