Swift和簡單彈出對話框:DOAlertController
簡單的Alert視圖,采用 Swift 開發,可用作 UIAlertController 的一個替代。它支持iOS7,它簡單并且易于定制。
Easy to use
DOAlertController can be used as aUIAlertController.
// Set title, message and alert style let alertController = DOAlertController(title: "title", message: "message", preferredStyle: .Alert) // Create the action. let cancelAction = DOAlertAction(title: "OK", style: .Cancel) { action in NSLog("The simple alert's cancel action occured.") } // Add the action. alertController.addAction(cancelAction) presentViewController(alertController, animated: true, completion: nil)
Customize
see DOAlertController-DEMO for details
- change Fonts
- change color (Background, View, Buttons)
- add TextField (Alert style only)
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!