IOS上的Toast
今天项目需要用到一个类似于安卓上的 Toast,
这个以前在网上看到过,但是一直没用过,今天要用就特意上网搜索了一下,结果有很多,
我用的是 https://github.com/scalessec/Toast
右边有个download就是下载,
下面 有介绍叫做readme.markdown
Setup Instructions
- Add
Toast+UIView.h
&Toast+UIView.m
to your project. - Link against QuartzCore.
- If you're using ARC, you'll need to add the
-fno-objc-arc
compiler flag toToast+UIView.m
.
Examples
// basic usage
[self.view makeToast:@"This is a piece of toast."];
// toast with duration, title, and position
[self.view makeToast:@"This is a piece of toast with a title."
duration:3.0
position:@"top"
title:@"Toast Title"];
// toast with an image
[self.view makeToast:@"This is a piece of toast with an image."
duration:3.0
position:[NSValue valueWithCGPoint:CGPointMake(110, 110)]
image:[UIImage imageNamed:@"toast.png"]];
// display toast with an activity spinner
[self.view makeToastActivity];
See the demo project for more examples.
这个或许更好点,可以搜索MBProgressHUD
日历也也一样,有PickerAlertView等很多第三方,可以到github搜索,也可以自己写,uiswitch也可以自己写
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如果单表数据量大,只能考虑分库分表吗?
· 一文彻底搞懂 MCP:AI 大模型的标准化工具箱
· 电商平台中订单未支付过期如何实现自动关单?
· 用 .NET NativeAOT 构建完全 distroless 的静态链接应用
· 为什么构造函数需要尽可能的简单
· Google发布A2A开源协议:“MCP+A2A”成未来标配?
· C# 多项目打包时如何将项目引用转为包依赖
· 一款让 Everything 更加如虎添翼的 .NET 开源辅助工具!
· 如果单表数据量大,只能考虑分库分表吗?
· 在Winform开发框架支持多种数据库基础上,增加对国产数据库人大金仓的支持