Toast 风格的消息提示 ASToast

码农软件 · 软件分类 · 提醒 (Notification) · 2019-05-21 09:44:46

软件介绍

ASToast 是一个用 Swift 写成的扩展,用于制作 Android Toast 风格的通知。

activity_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()


本文地址:https://www.codercto.com/soft/d/6211.html

疯狂的站长

疯狂的站长

温世豪 / 清华大学出版社 / 2010年05月 / 29.00元

受全球性金融危机的影响,就业变得越来越困难,众多青年,包括大学毕业生,无不感到就业的巨大压力,站长这一职业不但创业门槛低,而且还自由自在。其实,搭建一个网站是相当简单的,但要成为一名成功的站长则不那么容易。 本书作者是一名站长,从事互联网相关工作已十余年,自已也在经营一个知名网站,积累了大量网站运营经验。作者结合自身真实的“疯狂”创业经历,以平实、通俗的语言讲述如何从零开始起步,最终成为一名......一起来看看 《疯狂的站长》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

URL 编码/解码
URL 编码/解码

URL 编码/解码

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具