     override func viewDidAppear(_ animated: Bool)
     {
         registerForNotifications()
+        initializeDisplayValues()
     }
     
     

        }
        return true
    }
}

    
    @IBAction func transmitBeaconDidChange(_ sender: UISwitch)
    {
        print("Transmit switch did change: \(sender.isOn)")
        saveBeaconSwitch(isOn: sender.isOn)
    }
    
    
    func textFieldDidChange(sender : AnyObject) {
        guard let notification = sender as? NSNotification,
            let textFieldChanged = notification.object as? UITextField else
        {
                return
        }
        if let textString = textFieldChanged.text
        {
            print("text changed = \(textString)")
            switch textFieldChanged
            {
                case self.transmitBeaconUUID:
                    print("UUID changed")
                    saveBeaconUUID(string: textString)
                    if isValidUUID(string: textString)
                    {
                        print("Is valid UUID")
                        transmitBeaconSwitch.isOn = true
                    }
                    break
                case self.transmitBeaconMajor:
                    print("major changed")
                    saveBeaconMajor(string: textString)
                    break
                case self.transmitBeaconMinor:
                    print("minor changed")
                    saveBeaconMinor(string: textString)
                    break
                default:
                    print("unknown text field")
                    break
            }
        }
    }
