美文网首页
使用第三方类库(Toast+UIView)实现提示信息的显示

使用第三方类库(Toast+UIView)实现提示信息的显示

作者: 幻世神码 | 来源:发表于2016-09-14 13:44 被阅读2776次

实现在.m文件中导入头文件:#import"Toast+UIView.h"

- (IBAction)changeColor:(id)sender {

//直接调用显示活动指示器的方法

[self.view makeToastActivity];

//做一个延时要处理的信息

[NSTimer scheduledTimerWithTimeInterval:2 target:self selector:@selector(show) userInfo:nil repeats:NO];

}

-(void)show

{

//将活动显示器隐藏

[self.view hideToastActivity];

//调用提示信息的方法

[self.view makeToast:@"这就是你要显示的信息" duration:2 position:@"center"];

}

相关文章

网友评论

      本文标题:使用第三方类库(Toast+UIView)实现提示信息的显示

      本文链接:https://www.haomeiwen.com/subject/qeuvettx.html