Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
rechsteiner authored Feb 8, 2020
1 parent 18699b8 commit f546646
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
<p align="center">
<img src="https://rechsteiner-parchment.s3.eu-central-1.amazonaws.com/parchment-delegate.gif" alt="Cities Example" />
<img src="https://rechsteiner-parchment.s3.eu-central-1.amazonaws.com/parchment-unplash.gif" alt="Unsplash Example" />
<img src="https://rechsteiner-parchment.s3.eu-central-1.amazonaws.com/parchment-calendar.gif" alt="Calendar Example" />
<img src="https://rechsteiner-parchment.s3.eu-central-1.amazonaws.com/parchment-
.gif" alt="Calendar Example" />
</p>

## Features
Expand Down Expand Up @@ -241,9 +242,22 @@ pagingViewController.sizeDelegate = self

## Customization

Parchment is built to be very flexible. All customization is handled by the properties listed below. The menu items are displayed using UICollectionView, so they can display pretty much whatever you want (see: [`menuItemClass`](#menuItemClass)). If you need any further customization you can even subclass the collection view layout.
Parchment is built to be very flexible. The menu items are displayed using UICollectionView, so they can display pretty much whatever you want. If you need any further customization you can even subclass the collection view layout. All customization is handled by the properties listed below.

Example of customization:
### Custom cells

To use custom cells you need to subclass `PagingCell` and register the cell type for a given `PagingItem`:

```Swift
let pagingViewController = PagingViewController()
pagingViewController.register(CalendarPagingCell.self, for: CalendarItem.self)
```

Parchment will then dequeue your custom cell when you return the given `PagingItem` in your data source. You can register multiple cell types for different `PagingItem`s.

### Properties

All customization properties are set on `PagingViewController`:

```Swift
let pagingViewController = PagingViewController()
Expand Down

0 comments on commit f546646

Please sign in to comment.