let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet)
let copyAction = UIAlertAction(title: "复制", style: .default, handler: { action in
let pasteboard = UIPasteboard.general
pasteboard.string = model.contents
})
copyAction.setValue(UIColor(hexString: "4a4a4a", alpha: 1), forKey: "_titleTextColor")
alertController.addAction(copyAction)
let destructiveAction = UIAlertAction(title: "回复", style: .default, handler: { [weak self] action in
self?.selectSection = section
self?.growingTextView.becomeFirstResponder()
})
destructiveAction.setValue(UIColor(hexString: "#4a4a4a", alpha: 1), forKey: "_titleTextColor")
alertController.addAction(destructiveAction)
present(alertController, animated: true, completion: nil)
网友评论