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

遗传算法与工程优化

遗传算法与工程优化

程润伟 / 清华大学出版社 / 2004-1 / 39.00元

《遗传算法与工程优化》总结了遗传算法在工业工程相关领域应用的前沿进展。全书共分9章:遗传算法基础、组合优化问题、多目标优化问题、模糊优化问题、可靠性设计问题、调度问题、高级运输问题、网络设计与路径问题和制造元设计问题。内容既涵盖了遗传算法在传统优化问题中的新进展,又涉及了目前在供应链和物流研究中相当热门的话题。一起来看看 《遗传算法与工程优化》 这本书的介绍吧!

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换