SlideUpPanel is a custom UIViewController. This is a designed Show a Slide Up Panel.
- Xcode 9+
- ios 11.0+
- swift 4+
- Cocopods.
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
CocoaPods 1.1.0+ is required to build SlideUpPanel.
To integrate SlideUpPanel into your Xcode project using CocoaPods, specify it in your Podfile
:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!
target '<Your Target Name>' do
pod 'SlideUpPanel'
end
Then, run the following command:
$ pod install
import SlideUpPanel
... With custom view
var cardViewController : SlideUpPanel!
cardViewController = SlideUpPanel(vc: self, cardHeight: nil)
self.addChild(cardViewController)
self.view.addSubview(cardViewController.view)
With Viewcontroller
var cardViewController : SlideUpPanel!
cardViewController = SlideUpPanel(vc: self, cardHeight: nil)
let vc = self.storyboard?.instantiateViewController(withIdentifier: "MyViewController") as! MyViewController
cardViewController.setViewControllerAsContent(controller: vc)
self.addChild(cardViewController)
self.view.addSubview(cardViewController.view)
Enable/Diable CornerRadiusAnimation
cardViewController.isCornerRadiusAnimatorOn = false
cardViewController.isCornerRadiusAnimatorOn = true
Setting initial corner radius
cardViewController.initialCornerRadius = 12
This project is licensed under the MIT License - see the LICENSE.md file for details