All Projects → touchlane → Campcotcollectionview

touchlane / Campcotcollectionview

Licence: mit
Collapse and expand UICollectionView sections with one method call.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Campcotcollectionview

Luexpandabletableview
A subclass of UITableView with expandable and collapsible sections
Stars: ✭ 125 (-22.36%)
Mutual labels:  cocoapods, expandable, collapsible
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (-14.29%)
Mutual labels:  cocoapods, expandable, collapsible
Greedo Layout For Ios
Full aspect ratio grid layout for iOS
Stars: ✭ 837 (+419.88%)
Mutual labels:  library, cocoapods, uicollectionview
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (+511.18%)
Mutual labels:  cocoapods, uicollectionview
Koyomi
Simple customizable calendar component in Swift 📆
Stars: ✭ 716 (+344.72%)
Mutual labels:  cocoapods, uicollectionview
Styledecorator
Easy string decoration with styles
Stars: ✭ 17 (-89.44%)
Mutual labels:  library, cocoapods
Ynexpandablecell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 4
Stars: ✭ 445 (+176.4%)
Mutual labels:  expandable, collapsible
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+632.92%)
Mutual labels:  library, cocoapods
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+565.22%)
Mutual labels:  library, cocoapods
Mscircularslider
A fully-featured, powerful circular slider for iOS applications
Stars: ✭ 94 (-41.61%)
Mutual labels:  library, cocoapods
Datepicker
A Date Picker with Calendar for iPhone and iPad Apps.
Stars: ✭ 103 (-36.02%)
Mutual labels:  library, cocoapods
Fscalendar
A fully customizable iOS calendar library, compatible with Objective-C and Swift
Stars: ✭ 9,829 (+6004.97%)
Mutual labels:  library, cocoapods
Expandablecell
✨ Awesome expandable, collapsible tableview cell for iOS written in Swift 5
Stars: ✭ 559 (+247.2%)
Mutual labels:  expandable, collapsible
Centeredcollectionview
A lightweight UICollectionViewLayout that 'pages' and centers its cells 🎡 written in Swift
Stars: ✭ 965 (+499.38%)
Mutual labels:  cocoapods, uicollectionview
Tsmessages
💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot
Stars: ✭ 4,927 (+2960.25%)
Mutual labels:  library, cocoapods
Keyboardhidemanager
Codeless manager to hide keyboard by tapping on views for iOS written in Swift
Stars: ✭ 57 (-64.6%)
Mutual labels:  library, cocoapods
Mylinearlayout
MyLayout is a powerful iOS UI framework implemented by Objective-C. It integrates the functions with Android Layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,PathLayout,GridLayout,LayoutSizeClass to build your App 自动布局 UIView UITab…
Stars: ✭ 4,152 (+2478.88%)
Mutual labels:  cocoapods, uicollectionview
Animatedcollectionviewlayout
A UICollectionViewLayout subclass that adds custom transitions/animations to the UICollectionView without effecting your existing code.
Stars: ✭ 4,333 (+2591.3%)
Mutual labels:  cocoapods, uicollectionview
Predicateflow
Write amazing, strong-typed and easy-to-read NSPredicate.
Stars: ✭ 98 (-39.13%)
Mutual labels:  library, cocoapods
Closures
Swifty closures for UIKit and Foundation
Stars: ✭ 1,720 (+968.32%)
Mutual labels:  cocoapods, uicollectionview

LOGO

Language Build Status codecov Version License Platform

This library provides a custom UICollectionView that allows to expand and collapse sections. Provides a simple API to manage collection view appearance.

CampcotCollectionView

Requirements

  • iOS 9.0+
  • Xcode 10.2+
  • Swift 5.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate CampcotCollectionView into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'CampcotCollectionView'
end

Then, run the following command:

$ pod install

Usage

Manual Setup

import CampcotCollectionView
  1. Create CollectionView
let campcotCollectionView = CampcotCollectionView()
  1. Add campcotCollectionView to view hierarchy.
  2. Call toggle method on campcotCollectionView.
public func toggle(to section: Int,
                   offsetCorrection: CGFloat = default,
                   animated: Bool,
                   completion: ((Bool) -> Void)? = default)

Storyboard Setup

  1. Add UICollectionView to your Storyboard.
  2. In Identity Inspector set the Class property to CampcotCollectionView.
  3. Open Attributes Inspector and set the Layout property to Custom. Set Class property to either ExpandedLayout or CollapsedLayout.
  4. Create outlet for your collectionView.
  5. Set datasource and delegate for collectionView.
  6. Set the settings for collectionView in Attributes Inspector or manualy.

Documentation

CampcotCollectionView

A Boolean value that determines whether the sections are expanded.

public var isExpanded: Bool { get }

Expands all the sections. Pins a section at index section to the top of view bounds. offsetCorrection - the offset for pinned section from the top. Default value of offsetCorrection is 0. animated - if true expands sections with animation. completion - callback for animation.

public func expand(from section: Int,
                   offsetCorrection: CGFloat = default,
                   animated: Bool,
                   completion: ((Bool) -> Void)? = default)

Collapses all the sections. Pins a section at index section to the top of view bounds. offsetCorrection - the offset for pinned section from the top. Default value of offsetCorrection is 0. animated - if true collapses sections with animation. completion - callback for animation.

public func collapse(to section: Int,
                     offsetCorrection: CGFloat = default,
                     animated: Bool,
                     completion: ((Bool) -> Void)? = default)

Toggles current state from collapsed to expaned and vise versa. Pins a section at index section to the top of view bounds. offsetCorrection - the offset for pinned section from the top. Default value of offsetCorrection is 0. animated - if true toggles sections with animation. completion - callback for animation.

public func toggle(to section: Int,
                   offsetCorrection: CGFloat = default,
                   animated: Bool,
                   completion: ((Bool) -> Void)? = default)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].