Skip to content

Commit

Permalink
Merge README
Browse files Browse the repository at this point in the history
  • Loading branch information
3ph committed Dec 7, 2017
2 parents 91fab33 + 03d14cd commit 1145eeb
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,60 @@ Fork of <a href='https://github.com/Akkyie/AKPickerView-Swift'>AKPickerView-Swif

<img src="./Screenshot.gif" width="200" alt="Screenshot" />

## Usage

Since this view is using `UICollectionView` internally you have to provide data same way as you would do with collection view (using dataSource). You can also use delegate if you want to handle item selection or underlaying UIScrollView callbacks. See example project for details.

Set the direction to vertical.
```swift
pickerView.isHorizontal = false
```

Disable wheel effect of the picker.
```swift
pickerView.isFlat = true
```

Prevent center selection when scrolling.
```swift
pickerView.selectCenter = false
```

Set spacing between cells, default 10.
```swift
pickerView.cellSpacing = 10
```

Set cell size (width for horizontal, height for vertical style), default 100.
```swift
pickerView.cellSize = 100
```

Set wheel effect perspective representation.
```swift
pickerView.viewDepth = 2000
```

Disable fading gradient mask.
```swift
pickerView.maskDisabled = true
```

Current selected index might be obtained from `selectedIndex`.
```swift
NSLog("\(pickerView.selectedIndex)")
```

And reload the picker view when any change in data set occurs.
```swift
pickerView.reloadData()
```



## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.
To run the example project, clone the repo, and run `pod install` from the Example directory first. Or simplest way is just to run `pod try`.

## Installation

Expand Down

0 comments on commit 1145eeb

Please sign in to comment.