swift 更改 UIAlertController.UIAle

2019-05-27  本文已影响0人  Enter_Y
        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)
上一篇下一篇

猜你喜欢

热点阅读