Skip to content

Commit

Permalink
添加清空及设置默认值功能
Browse files Browse the repository at this point in the history
  • Loading branch information
guanghui.tian committed Aug 26, 2021
1 parent 7e33383 commit db0a996
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PushWithP8/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class MainViewController: NSViewController {
{"aps":{"alert":"这是推送标题","body":"这是推送内容,这里的文字长度是有限制的","sound":"default","badge":1}}
"""
envSwitch.state = NSControl.StateValue.off
resultLabel.stringValue = ""
}

@IBAction func clearAction(_ sender: Any) {
Expand All @@ -58,6 +59,7 @@ class MainViewController: NSViewController {
deviceTokenTextField.stringValue = ""
payLoadTextField.stringValue = ""
envSwitch.state = NSControl.StateValue.off
resultLabel.stringValue = ""
}

@IBAction func sendAction(_ sender: NSButton) {
Expand Down

0 comments on commit db0a996

Please sign in to comment.