         addRecipientsButton.setTitle(NSLocalizedString("preview view recipients add recipients button title", comment: "Add reciepients button"), forState: .Normal)
         sendButton.title = NSLocalizedString("preview view recipients send button title", comment: "Send button")
         
+        navigationController?.delegate = self
     }
     
     func webViewDidFinishLoad(webView: UIWebView) {


import UIKit

class PreviewViewController: UIViewController, RecipientsViewControllerDelegate, UIWebViewDelegate {
    
    var recipients = [Recipient]()
    var modules = [ComposerModule]()

        }
        
        previewHeaderLabel.text = NSLocalizedString("preview view header title", comment: "Preview view header")

    }
    
    @IBAction func didTapFooterView(sender: AnyObject) {
        performSegueWithIdentifier("addRecipientsSegue", sender: self)
    }
    
    func navigationController(navigationController: UINavigationController, willShowViewController viewController: UIViewController, animated: Bool) {        
        if let composerViewController = viewController as? ComposerViewController {
            composerViewController.recipients = recipients
        }
    }

    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if let recipientsViewController = segue.destinationViewController as? RecipientViewController {
            recipientsViewController.recipientDelegate = self
            if recipients.count > 0 {
                recipientsViewController.addedRecipients = recipients
            }
        }
        
        if let composerViewController = segue.destinationViewController as? ComposerViewController {
            composerViewController.recipients = recipients
        }
    }
    
