📜  更清洁的键盘 mac book pro 2019 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:43.200000             🧑  作者: Mango

代码示例1
override func viewWillAppear(_ animated: Bool) {
    super.viewWillAppear(animated)
    
    let menuButtonImage = UIImage(systemName: "flame")
    let menuButton = UIBarButtonItem(image: menuButtonImage, style: .plain, target: self, action: #selector(didTapMenuButton))
    navigationItem.rightBarButtonItem = menuButton
}

@objc public func didTapMenuButton() {
    print("Hello World")
}