NKJModalSelector is the alternative to the library of UIPickerView(drum roll) in Swift. You can select a item using UITableView. This is inspired to Etsy's view controller transition.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
NKJModalSelector-Demo.xcodeproj
NKJModalSelector-Demo.xcworkspace
NKJModalSelector-Demo
NKJModalSelector-DemoUITests
Sources
.gitignore
.travis.yml
LICENSE
NKJModalSelector.podspec
Podfile
Podfile.lock
README.md

README.md

NKJModalSelector

CI Status Version License Platform

Usage

NKJModalSelector 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.

Requirements

  • iOS 8.0+
  • Xcode 7.2+

Installation

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

pod "NKJModalSelector"

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

ViewController

[NKJModalSelector appearance].shouldTransformScaleDown = YES;

NKJModalSelectorNavigationController *modalNavigationViewController = (NKJModalSelectorNavigationController *)[self.storyboard instantiateViewControllerWithIdentifier:@"NKJModalSelectorNavigationController"];

modalNavigationViewController.parentNavigationController = self.navigationController;

[self.navigationController addChildViewController:modalNavigationViewController];
[self.navigationController si_presentViewControllerToViewController:modalNavigationViewController];

ModalViewController

  • Create NavigationController and ViewController in storyboards.
  • Input NKJModalSelectorNavigationController in Custom Class for NavigationController.

Closing a window

You can close using the following code in viewController:

NKJModalSelectorNavigationController *currentNavigationController;
currentNavigationController = (NKJModalSelectorNavigationController *)self.navigationController;
[currentNavigationController.parentNavigationController si_dismissModalViewWithComplation:^{
    // something
}];

Author

nakajijapan, pp.kupepo.gattyanmo@gmail.com

License

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