IOS-382 Fixed
authorigor <igor@pep-project.org>
Fri, 13 Jan 2017 10:44:06 +0100
changeset 141463f17f38ca24
parent 1413 0665f893c581
child 1415 b8e4fcea1def
IOS-382 Fixed
pEpForiOS/UI/Compose/ComposeTableViewController.swift
pEpForiOS/UI/EmailDisplay/EmailListViewController.swift
pEpForiOS/UI/EmailDisplay/EmailViewController.swift
pEpForiOS/UI/ImapSetup/IMAPSettingsTableView.swift
pEpForiOS/UI/ImapSetup/SMTPSettingsTableView.swift
     1.1 --- a/pEpForiOS/UI/Compose/ComposeTableViewController.swift	Fri Jan 13 10:29:20 2017 +0100
     1.2 +++ b/pEpForiOS/UI/Compose/ComposeTableViewController.swift	Fri Jan 13 10:44:06 2017 +0100
     1.3 @@ -288,6 +288,9 @@
     1.4      
     1.5      @IBAction func cancel() {
     1.6          let alertCtrl = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
     1.7 +        if let popoverPresentationController = alertCtrl.popoverPresentationController {
     1.8 +            popoverPresentationController.sourceView = view
     1.9 +        }
    1.10          
    1.11          alertCtrl.addAction(alertCtrl.action("MailComp.Action.Cancel", .cancel, {}))
    1.12          
     2.1 --- a/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Fri Jan 13 10:29:20 2017 +0100
     2.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailListViewController.swift	Fri Jan 13 10:44:06 2017 +0100
     2.3 @@ -240,6 +240,9 @@
     2.4          alertControler.addAction(replyAction)
     2.5          alertControler.addAction(forwardAction)
     2.6          alertControler.addAction(markAction)
     2.7 +        if let popoverPresentationController = alertControler.popoverPresentationController {
     2.8 +            popoverPresentationController.sourceView = cell
     2.9 +        }
    2.10          present(alertControler, animated: true, completion: nil)
    2.11      }
    2.12      
     3.1 --- a/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Fri Jan 13 10:29:20 2017 +0100
     3.2 +++ b/pEpForiOS/UI/EmailDisplay/EmailViewController.swift	Fri Jan 13 10:44:06 2017 +0100
     3.3 @@ -42,6 +42,10 @@
     3.4  
     3.5      @IBAction func pressReply(_ sender: UIBarButtonItem) {
     3.6          let alertViewWithoutTitle = UIAlertController()
     3.7 +        
     3.8 +        if let popoverPresentationController = alertViewWithoutTitle.popoverPresentationController {
     3.9 +            popoverPresentationController.sourceView = view
    3.10 +        }
    3.11  
    3.12          let alertActionReply = UIAlertAction (title: "Reply".localized, style: .default) { (action) in
    3.13              self.performSegue(withIdentifier: .segueReplyFrom , sender: self)
     4.1 --- a/pEpForiOS/UI/ImapSetup/IMAPSettingsTableView.swift	Fri Jan 13 10:29:20 2017 +0100
     4.2 +++ b/pEpForiOS/UI/ImapSetup/IMAPSettingsTableView.swift	Fri Jan 13 10:44:06 2017 +0100
     4.3 @@ -78,12 +78,15 @@
     4.4              message: NSLocalizedString("Choose a Security protocol for your accont",
     4.5                  comment: "UI alert message for transport protocol"),
     4.6              preferredStyle: .actionSheet)
     4.7 -        alertController.popoverPresentationController?.sourceView = sender
     4.8  
     4.9          let block: (ConnectionTransport) -> () = { transport in
    4.10              self.model.transportIMAP = transport
    4.11              self.updateView()
    4.12          }
    4.13 +        
    4.14 +        if let popoverPresentationController = alertController.popoverPresentationController {
    4.15 +            popoverPresentationController.sourceView = sender
    4.16 +        }
    4.17  
    4.18          alertController.setupActionFromConnectionTransport(.plain, block: block)
    4.19          alertController.setupActionFromConnectionTransport(.TLS, block: block)
     5.1 --- a/pEpForiOS/UI/ImapSetup/SMTPSettingsTableView.swift	Fri Jan 13 10:29:20 2017 +0100
     5.2 +++ b/pEpForiOS/UI/ImapSetup/SMTPSettingsTableView.swift	Fri Jan 13 10:44:06 2017 +0100
     5.3 @@ -100,12 +100,15 @@
     5.4              message: NSLocalizedString("Choose a Security protocol for your accont",
     5.5                  comment: "UI alert message for transport protocol"),
     5.6              preferredStyle: .actionSheet)
     5.7 -        alertController.popoverPresentationController?.sourceView = sender
     5.8  
     5.9          let block: (ConnectionTransport) -> () = { transport in
    5.10              self.model.transportSMTP = transport
    5.11              self.updateView()
    5.12          }
    5.13 +        
    5.14 +        if let popoverPresentationController = alertController.popoverPresentationController {
    5.15 +            popoverPresentationController.sourceView = sender
    5.16 +        }
    5.17  
    5.18          alertController.setupActionFromConnectionTransport(.plain, block: block)
    5.19          alertController.setupActionFromConnectionTransport(.TLS, block: block)