dzrs.net
当前位置:首页 >> swiFt AlErtviEw >>

swiFt AlErtviEw

let alertView = UIAlertView(title: "错误", message: nil,delegate: self, cancelButtonTitle: "确定") alertView.show()

对话框视图样式出现在了我们面前,直到现在它都没有发生过很大的变化。下面的代码片段展示了如何初始化和显示一个带有“取消”和“好的”按钮的对话框视图。 Objective-C版本

import UIKit class ViewController: UIViewController { var actionString: String? @IBAction func showAlert(sender: UIButton) { let alertViewController = UIAlertController(title: "Test Title", message: "Message", preferredStyle: ....

swift学习之弹出提示框的几种方式 使用UIAlertView: override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = UIColor.whiteColor() var showAlertBtn = UIButton(frame: CGRectMake(10, 50, 150, 20)) showAlertBtn.ba...

import UIKit class ViewController: UIViewController { var actionString: String? @IBAction func showAlert(sender: UIButton) { let alertViewController = UIAlertController(title: "Test Title", message: "Message", preferredStyle:在...

网站首页 | 网站地图
All rights reserved Powered by www.dzrs.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com