星空网 > 软件开发 > 操作系统

【代码笔记】轮询弹出框

一,效果图。

【代码笔记】轮询弹出框images/loading.gif' data-original="http://images2015.cnblogs.com/blog/337518/201510/337518-20151019151551958-688656925.jpg" width="218" height="400" />

二,工程图。

【代码笔记】轮询弹出框

三,代码。

RootViewController.m

【代码笔记】轮询弹出框
#import "RootViewController.h"//加入弹出框的头文件#import "MPNotificationView.h"@interface RootViewController ()@end@implementation RootViewController- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{  self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];  if (self) {    // Custom initialization  }  return self;}- (void)viewDidLoad{  [super viewDidLoad];  // Do any additional setup after loading the view.    self.title=@"RootViewController";    //弹出框前面有图片   [self showWithFrame];  //弹出框可以进行点击   [self showWithTouch];  }#pragma -mark -可以点击的,点击后消息,并且可以在点击后添加事件-(void)showWithTouch{  [MPNotificationView notifyWithText:@"李华:"                detail:@"今天有时间吗?"             andTouchBlock:^(MPNotificationView *notificationView) {                             UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"提醒" message:@"已点击弹出框" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];               [alert show];                           }];}#pragma -mark -弹出框在前面有一张图片,然后,5.0s后自己会主动消失。没到5.0s点击的时候也会消失。-(void)showWithFrame{  [MPNotificationView notifyWithText:@"李华:"                detail:@"今天有时间吗?"                 image:[UIImage imageNamed:@"1.jpeg"]              andDuration:5.0];}- (void)didReceiveMemoryWarning{  [super didReceiveMemoryWarning];  // Dispose of any resources that can be recreated.}
【代码笔记】轮询弹出框

 

 


 

原标题:【代码笔记】轮询弹出框

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

欧洲知识产:https://www.goluckyvip.com/tag/702.html
新协议:https://www.goluckyvip.com/tag/7020.html
跨境运营图解:https://www.goluckyvip.com/tag/7021.html
日本开店资料:https://www.goluckyvip.com/tag/7022.html
选品表格:https://www.goluckyvip.com/tag/7023.html
欧洲站玩具:https://www.goluckyvip.com/tag/7024.html
NRA账户的开户主体包括:香港、美国、新加坡、欧盟等国家的详细解析 :https://www.xlkjsw.com/news/94338.html
湘西游轮六 湘江游轮夜游:https://www.vstour.cn/a/411226.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流