这是很好的环境…
func popUpController(){ let alertController = UIalertController(title: "nnnnnn", message: nil, preferredStyle: UIalertController.Style.actionSheet) let margin:CGFloat = 8.0 let rect = CGRect(x: margin, y: margin, width: alertController.view.bounds.size.width - margin * 4.0, height: 100.0) let customView = UITextView(frame: rect) customView.backgroundColor = UIColor.clear customView.font = UIFont(name: "Helvetica", size: 15) // customView.backgroundColor = UIColor.greenColor() alertController.view.addSubview(customView) let somethingAction = UIalertAction(title: "Something", style: UIalertAction.Style.default, handler: {(alert: UIalertAction!) in print("something") print(customView.text) }) let cancelAction = UIalertAction(title: "Cancel", style: UIalertAction.Style.cancel, handler: {(alert: UIalertAction!) in print("cancel")}) alertController.addAction(somethingAction) alertController.addAction(cancelAction) self.present(alertController, animated: true, completion:{})}


