【代码笔记】iOS-轮询弹出框
来源:互联网 发布:python文本挖掘 编辑:程序博客网 时间:2024/06/18 15:39
一,效果图。
二,工程图。
三,代码。
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.}
0 0
- 【代码笔记】iOS-轮询弹出框
- 【代码笔记】iOS-自定义弹出框
- 【代码笔记】iOS-键盘自适应弹出
- 【代码笔记】iOS-点击搜索按钮,或放大镜后都会弹出搜索框
- IOS 8.1以后的弹出框代码
- 【代码笔记】iOS-点击顶点处,弹出另一个小的界面
- 弹出框代码
- IOS-封装弹出框
- IOS自定义弹出框
- iOS-封装弹出框
- IOS弹出提示框
- iOS自定义弹出框
- ActionSheetDialog ios 弹出框
- IOS弹出提示框
- ios 弹出框
- ios弹出框
- 弹出框笔记
- 【代码笔记】iOS-单项选择框
- 堆栈问题
- 1040. Longest Symmetric String (25)
- 大脑“芯片”与地平线机器人科技创新企业
- 别问楼主是什么,自己看嘿嘿,mark
- hdu3336Count the string(kmp的next的使用
- 【代码笔记】iOS-轮询弹出框
- 楼梯问题
- list容器介绍
- 逛了一下,找到两个自己感兴趣的
- tomcat的realm域
- 代码片断
- 深度学习--学习总结
- Android Studio安装与SDK配置
- SSL证书生成方法