• This repository has been archived on 01/Aug/2024
  • Stars
    star
    110
  • Rank 316,770 (Top 7 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 10 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

UICollectionView subclass with vertically expandable and collapsible sections

APLExpandableCollectionView

UICollectionView subclass with vertically expandable and collapsible sections.

  • animated expand and collapse animation
  • scrolls expanded section to visible
  • customizable flow layout for iPhone and iPad
  • supports single and multiple expanded sections
  • supports addition of sections

iPad Screenshot iPhone Screenshot

Installation

Install via cocoapods by adding this to your Podfile:

pod "APLExpandableCollectionView"

Usage

In your storyboard, set the custom class of your UICollectionView to APLExpandableCollectionView and it's layout to custom, using the APLExpandableSectionFlowLayout class.

You might want to customize the collection view layout's sectionInset, minimumLineSpacing, itemSize, etc. to fit your layout needs and customize the cell appearance depending on whether it is a section's first cell, which is the "header cell", or a regular item. Check out the demo project as reference.

If you are not interested in expandable cells but would like to use a UICollectionViewFlowLayout which layouts it's sections and their items from top to bottom, left to right instead of left to right, top to bottom as displayed on the iPad screenshot, you could benefit from the APLSectionTopToBottomFlowLayout. It is inherited by the APLExpandableSectionFlowLayout but could be used on its own.

Collapsing all expanded sections before expanding the next section

self.collectionView.allowsMultipleExpandedSections = NO;

Dynamically adding sections

Adds a new section after the existing sections and displays it as collapsed:

[self.collectionView addExpandedSection:NO];

Adds a new section before the existing sections and displays it as expanded:

[self.collectionView insertExpandedSection:YES atIndex:0];

More Repositories

1

ExpandableLabel

A simple UILabel subclass that shows a tappable link if the content doesn't fit the specified number of lines
Swift
461
star
2

APLSlideMenu

Sliding Hamburger Menu like the one in the Facebook App
Objective-C
43
star
3

APLKeyboardControls

inputAccesoryView above the keyboard with done button and optional previous and next buttons
Objective-C
28
star
4

APLFacebookProxyActivity

A proxy UIActivity to use when Facebook account has not been set up yet in iOS Settings
Objective-C
12
star
5

BundleFileUpdater

Deliver your iOS or OS X app with up-to-date local resource files and update them dynamically from a remote url
Swift
9
star
6

APLTextView

A text view allowing to set a placeholder text just like for UILabel etc. In addition you can set a max character count. The text view will accept only the specified number of characters as input in this case. The remaining number of characters the user is able to enter will be displayed on the bottom right corner of the text view.
Objective-C
6
star
7

APLTextField

Advanced text field with the possibility to be connected to a picker
Objective-C
5
star
8

APLSearchBar

UISearchBar subclass with extended UISearchBarDelegate protocol
Objective-C
4
star
9

APLObject

NSObject subclass with automatic debugDescription
Objective-C
4
star
10

APLPageViewControllerDataSource

APLPageViewControllerDataSource is an array based data source for UIPageViewController.
Objective-C
4
star
11

APLNetworkLayer

APLNetworkLayer is a convenient interface for Apple's network framework that provides commonly used features.
Swift
3
star
12

NSArray-SafeAccess

Avoid NSRangeException when dealing with NSArray
Ruby
3
star
13

APLWKWebView

Objective-C
3
star
14

UIViewInspectable

UIView extension for setting cornerRadius, borderWidth or borderColor in Interface Builder as IBInspectable
Objective-C
3
star
15

AFOAuth2Client

Objective-C
2
star
16

APLLog

Logs debug output to console as alternative to NSLog
Objective-C
2
star
17

APLCoreDataStore

CoreData stack with synchronized NSManagedObjectContexts for main and private queue
Objective-C
2
star
18

ClientError

Log NSError or custom errors to the Parse.com database using the Parse iOS SDK and get error email reports
JavaScript
1
star
19

APLEasyTextField

Objective-C
1
star
20

APLStoryboardContainerViewController

A container view controller referencing and automatically loading view controller residing in different storyboards. The foreign view controller will be embedded as child view controller.
Objective-C
1
star
21

APLUIKitExtension

Useful UIKit Extension
Swift
1
star
22

APLWhatsappProxyActivity

A UIActivity to be able to share something via whatsapp
Objective-C
1
star
23

iOS-App-Foundation

A collection of extensions, helper methods and functions etc. made with Swift
Swift
1
star
24

APLPullToRefreshContainer

Objective-C
1
star
25

APLIntroView

APLIntroView uses a single ViewController to extend the launch screen by displaying a launch image or showing a video with configurable options.
Swift
1
star
26

APLArrayDataSource

UITableViewDataSource for NSArray
Objective-C
1
star
27

AdaptiveSidebarViewController

A simple container which can adaptively display an iOS viewcontroller in a sidebar
Swift
1
star
28

APLTableViewModel

A table view model which can be observed via delegate
Objective-C
1
star
29

APLUrlTextView

A simple UITextView extension allowing to add URLs and offering the possibility to be informed when such an URL has been selected by the user
Objective-C
1
star
30

APLProgressKringel

Objective-C
1
star