Toast 风格的消息提示 ASToast
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/abdullahselek/ASToast
软件介绍
ASToast 是一个用 Swift 写成的扩展,用于制作 Android Toast 风格的通知。
使用示例:
// make a toast with single text
self.view.makeToast("Single text toast")
// make a toast with text, title, position and duration
self.view.makeToast("Toast with custom text, title and duration", duration: NSTimeInterval(3.0),
position: ASToastPosition.ASToastPositionCenter.rawValue, title: "Title")
// Make toast with an image
self.view.makeToast("Toast with an image", duration: NSTimeInterval(3.0),
position: ASToastPosition.ASToastPositionTop.rawValue, image: UIImage(named: "apple_logo"))
// Show a custom view as toast
var customView: UIView! = UIView(frame: CGRectMake(0.0, 0.0, 200.0, 300.0))
customView.autoresizingMask = UIViewAutoresizing.FlexibleLeftMargin | UIViewAutoresizing.FlexibleRightMargin |
UIViewAutoresizing.FlexibleTopMargin | UIViewAutoresizing.FlexibleBottomMargin
customView.backgroundColor = UIColor.greenColor()
self.view.showToast(customView, duration: NSTimeInterval(3.0), position: ASToastPosition.ASToastPositionCenter.rawValue)
// Show activity indicator
self.view.makeToastActivity()Code Complete
Steve McConnell / Microsoft Press / 2004-6-19 / GBP 40.99
在线阅读本书 Widely considered one of the best practical guides to programming, Steve McConnells original CODE COMPLETE has been helping developers write better software for more than a decade. Now......一起来看看 《Code Complete》 这本书的介绍吧!
