zhuorantan / LocationPicker

A ready for use and fully customizable location picker for your app
MIT License
399 stars 79 forks source link

Storyboard approach causes the entire navigation controller to be dismissed #17

Open crizzis opened 7 years ago

crizzis commented 7 years ago

The documentation fails to mention that when using storyboards, the LocationPicker controller should be embedded in its own navigation controller as well if 'Done' and 'Cancel' buttons are used. Otherwise, the 'parent' navigation controller is dismissed due to the call to dismissViewControllerAnimated.

Alternatively, the code could check whether LocationPicker is the root view controller and if not, call navigationController.popViewControllerAnimated instead.

jaimeagudo commented 7 years ago

Add it to the docs for now mate 👍