IOS上的Toast

 

今天项目需要用到一个类似于安卓上的 Toast,

 这个以前在网上看到过,但是一直没用过,今天要用就特意上网搜索了一下,结果有很多,

 

我用的是 https://github.com/scalessec/Toast

 

 

右边有个download就是下载,

下面 有介绍叫做readme.markdown



Setup Instructions

  1. Add Toast+UIView.h & Toast+UIView.m to your project.
  2. Link against QuartzCore.
  3. If you're using ARC, you'll need to add the -fno-objc-arc compiler flag to Toast+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也可以自己写

 

 

转载于:https://www.cnblogs.com/ioschen/p/3324715.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值