NKJModalSelector 0.2.4

NKJModalSelector 0.2.4

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Oct 2016

Maintained by nakajijapan.



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, [email protected]

License

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