     }
 
 
+    override func viewDidAppear(_ animated: Bool)
+    {
+        registerForNotifications()
+    }
+    
+    
+    override func viewWillDisappear(_ animated: Bool)
+    {
+        unregisterForNotifications()
+    }
+    
+    
+    func registerForNotifications()
+    {
+        let notificationCenter = NotificationCenter.default
+        notificationCenter.addObserver(self,
+                                    selector: #selector(textFieldDidChange),
+                                    name: NSNotification.Name.UITextFieldTextDidChange,
+                                    object: nil)
+    }
+    
+    
+    func unregisterForNotifications()
+    {
+        let notificationCenter = NotificationCenter.default
+        notificationCenter.removeObserver(self)
+    }
+    
+
     func handleUnwindRecognizer(_ recognizer: UIScreenEdgePanGestureRecognizer)
     {
         if recognizer.state == .began

//
//  ConfigViewController.swift
//  Patriot
//
//  Created by Ron Lisle on 5/29/17.
//  Copyright © 2017 Ron Lisle. All rights reserved.

    
    @IBAction func transmitBeaconDidChange(_ sender: UISwitch)
    {
        print("Transmit switch did change: \(transmitBeaconSwitch.isOn)")
    }
    
    
    @objc func textFieldDidChange(sender : AnyObject) {
        guard let notification = sender as? NSNotification,
            let textFieldChanged = notification.object as? UITextField,
            textFieldChanged == self.transmitBeaconUUID else
        {
                return
        }
        print("UUID changed: \(transmitBeaconUUID.text)")
        //TODO: handle text
    }
}
