I am making a camera app, which gives the user access to the Photo Library. They touch the button, and UIImagePickerControllerSourceTypeSavedPhotosAlbum pops up using presentModalViewController. When they touch a photo, I want a view to push the ImagePicker to the left and the new view to come in. The thing is, I want to keep the ImagePicker up, so when they go back to it there isn't a lag. This happens in many camera apps like NightCamera. Whenever I use [self.navigationController pushViewController:photoPreview];, it pushes the view to the main view, not the picker. When I use [picker.navigationController pushViewController:photoPreview];, nothing happens, because the picker's navigationController is nil. Does anyone know what to do?
Yes it is possible. There is no such thing as "modal view controller", any view controller can be presented modaly.
Since UIImagePickerController is already a UINavigationController, you can push views directly on it. So instead of
[picker.navigationController pushViewController:some_view_controller];
just do
[picker pushViewController:some_view_controller];
removing .navigationController.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With