2
0

Source is button item, not a view.

This commit is contained in:
Maarten Billemont
2020-05-24 10:54:25 -04:00
parent 5db294bdb3
commit 7368b1be90
3 changed files with 6 additions and 6 deletions

View File

@@ -98,12 +98,12 @@ decisionHandler:(void ( ^ )(WKNavigationActionPolicy))decisionHandler {
#pragma mark - Actions
- (IBAction)action:(id)sender {
- (IBAction)action:(UIBarButtonItem *)sender {
UIAlertController *controller = [UIAlertController alertControllerWithTitle:self.webView.URL.host
message:self.webView.URL.absoluteString
preferredStyle:UIAlertControllerStyleActionSheet];
[controller.popoverPresentationController setSourceView:sender];
[controller.popoverPresentationController setBarButtonItem:sender];
[controller addAction:[UIAlertAction actionWithTitle:@"Safari" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
[UIApp openURL:self.webView.URL];
}]];