AnnouncementViewController

class AnnouncementViewController : UIViewController

The configuration ViewController class for announcements.

  • The button for saving the changes to the configuration.

    Declaration

    Swift

    @IBOutlet
    var saveButton: UIButton!
  • The switch to determine whether the announcement is going to be displayed.

    Declaration

    Swift

    @IBOutlet
    var announcementSwitch: UISwitch!
  • The UITextField for inputing the title of the announcement.

    Declaration

    Swift

    @IBOutlet
    var titleField: UITextField!
  • The UITextField for inputing the first line of the announcement.

    Declaration

    Swift

    @IBOutlet
    var firstField: UITextField!
  • The UITextField for inputing the second line of the announcement.

    Declaration

    Swift

    @IBOutlet
    var secondField: UITextField!
  • Undocumented

    Declaration

    Swift

    @IBOutlet
    var currentAnnouncement: UILabel!
  • Disables the text fields if the switch is off, because it means that the announcement is not going to be displayed.

    Declaration

    Swift

    @IBAction
    func switchSwitched(_ sender: UISwitch)
  • Execute when saveButton is clicked. This method first check whether an iCloud account is logged into the device, if true, then it will try to upload the Announcement record.

    Declaration

    Swift

    @IBAction
    func saveClicked(_ sender: Any)