Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 2.36 KB

README.md

File metadata and controls

70 lines (46 loc) · 2.36 KB

AYPullSheetViewController

CI Status Version License Platform

About

AYPullSheetViewController - is the pull view controller. That you can use to display any additional information or provide a list of actions to the user for choosing.

Installation

AYPullSheetViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

inhibit_all_warnings!

target 'YOUR_TARGET_NAME' do
  use_frameworks!
	pod 'AYPullSheetViewController'
end

Usage

// 'clickHandler' - closure of 'AYActionViewClickHandler' type.

let pullSheet = AYPullSheetViewController.create(
  initialAppearancePercent: 32,
  finalAppearancePercent: 92,
  horizontalSpacing: 16,
  animationType: .scaled)
  
pullSheet.containerView?.pullView?.topCornerRadius = 16
pullSheet.containerView?.pullView?.arrow?.strokeColor = .action

pullSheet.addRow(actionView: AYPullItemActionView.make(with: "Home", image: nil, clickHandler: clickHandler))
pullSheet.addRow(actionView: AYPullItemActionView.make(with: "About", image: nil, clickHandler: clickHandler))
pullSheet.addRow(actionView: AYPullItemActionView.make(with: "Settings", image: nil, clickHandler: clickHandler))

present(pullSheet, animated: true, completion: nil)

Demo

Author

Anton Yereshchenko

License

AYPullSheetViewController is available under the MIT license. See the LICENSE file for more info.

Used in project

Icons:

Icons8 - https://icons8.com