I'm working on a project where I'm using 2 views, MainView
and SecondView
.
MainView
is more or less a start pages and then I use the segue function to go from MainView
to SecondView
.
In SecondView
I have WebView
and on this website I have a file uploader. So the user should be able to upload images from his or her photo library to the site.
The website is accessed with this code:
if let url = NSURL(string: "https://example.com/uploader") {
webView.loadRequest(NSURLRequest(URL: url))
}
The problem is that when I try to upload an image it only segues back to my MainView
So when I press Photo Library it segues back to MainView.
However I recreated the WebView version of the app in a new project with only one view and then everything works like a charm as shown below
So basically my question is, how do I prevent the app from segueing back when I select Photo Library?
Link to Download the project and see for yourself.