Adjusted to try and avoid moderation...
If you need code then...
In the view controller that needs to present the logon...
Adopt the SFSafariViewControllerDelegate protocol
Add a property or instance variable in the .m file
@property (nonatomic, strong) SFSafariViewController *mySafariWebView;
In the place where you want to present the web view
NSURL *tmpURL = [[NSURL alloc] initWithString:@"http://www.apple.com"];
self.mySafariWebView = [[SFSafariViewController alloc] initWithURL:tmpURL];
[self.mySafariWebView setDelegate:self];
[self.navigationController presentViewController:self.mySafariWebView animated:YES completion:nil];
You will then need to implement
- (void)safariViewControllerDidFinish:(SFSafariViewController *)controller {
[controller dismissViewControllerAnimated:YES completion:nil];
do any additional stuff needed after the user tapped done by your code
}
This will dissmiss the web view and show the previous screen.
The delegate protocol documentation....
https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewControllerDelegate/index.html#//apple_ref/occ/intfm/SFSafariViewControllerDelegate/safariViewController:didCompleteInitialLoad:
Safari webview class
https://developer.apple.com/library/ios/documentation/SafariServices/Reference/SFSafariViewController_Ref/#//apple_ref/occ/instm/SFSafariViewController/initWithURL:entersReaderIfAvailable:
This is iOS 9 and later, if you need to support iOS 8, you should likely use the WKWebView
https://developer.apple.com/library/ios/documentation/WebKit/Reference/WKWebView_Ref/#//apple_ref/occ/instp/WKWebView/configuration