修复清空按钮在暗夜模式下显示为灰色
This commit is contained in:
@@ -96,10 +96,16 @@ class ClipInboxViewController: UIViewController {
|
||||
let isEmpty = clips.isEmpty
|
||||
emptyLabel.isHidden = !isEmpty
|
||||
tableView.isHidden = isEmpty
|
||||
navigationItem.rightBarButtonItem?.isEnabled = !isEmpty
|
||||
}
|
||||
|
||||
@objc private func didTapClearButton() {
|
||||
guard !clips.isEmpty else {
|
||||
let alert = UIAlertController(title: "提示", message: "收集箱为空,没有可清空的内容。", preferredStyle: .alert)
|
||||
alert.addAction(UIAlertAction(title: "确定", style: .default))
|
||||
present(alert, animated: true)
|
||||
return
|
||||
}
|
||||
|
||||
let alert = UIAlertController(
|
||||
title: "清空收集箱",
|
||||
message: "确定要删除所有保存的文案吗?此操作不可撤销。",
|
||||
|
||||
Reference in New Issue
Block a user