Shari is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView. Is inspired to Etsy's view controller transition.
- iOS 8.0+
- Xcode 7.2+
Shari is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Shari"
Then, run the following code:
$ pod install
Carthage is a decentralized dependency manager for Cocoa application.
$ brew update
$ brew install carthage
To integrate Kingfisher into your Xcode project using Carthage, specify it in your Cartfile
:
github "nakajijapan/Shari"
Then, run the following command to build the Kingfisher framework:
$ carthage update
To run the example project, clone the repo, and run pod install
from the Example directory first.
let modalNavigationVC = self.storyboard!.instantiateViewControllerWithIdentifier("ModalNavigationController") as! Shari.NavigationController
modalNavigationVC.parentNavigationController = self.navigationController
self.navigationController!.addChildViewController(modalNavigationVC)
self.navigationController?.si_presentViewController(modalNavigationVC)
You can change background color using following code:
Shari.BackgroundColorOfOverlayView = UIColor.redColor()
- Create NavigationController and ViewController in storyboards.
- Input Shari.NavigationController in Custom Class for NavigationController.
You can close using the following code in viewController:
let currentNavigationController = self.navigationController as! Shari.NavigationController
currentNavigationController.parentNavigationController!.si_dismissModalView({ () -> Void in
// something
})
nakajijapan, [email protected]
Shari is available under the MIT license. See the LICENSE file for more info.