ios表单验证帮助类
摘要:// // ValidateHelper.h // #import @interface ValidateHelper : NSObject //邮箱 + (BOOL) validateEmail:(NSString *)email; //手机号码验证 + (BOOL) validateMobile1:(NSString *)mobile; //车牌号验证 + (BOOL) valida...
阅读全文
ios 手机验证码用户注册(倒计时15秒)
摘要:// // ViewController.m // register手机验证码注册 // // Created by zzqqrr on 17/8/28. // Copyright (c) 2017年 zzqqrr. All rights reserved. // #import "ViewController.h" #import "MBProgressHUD+MJ.h" @in...
阅读全文
ios UITableView性能优化
摘要:/** * 每当有一个cell进入视野范围内,就会调用 */ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { // static修饰局部变量:可以保证局部变量只分配一次存储空间(只初始化一次) static NSS...
阅读全文
ios隐藏头部状态栏级tableview头部控件
摘要:- (BOOL)prefersStatusBarHidden { return YES; } self.tableView.separatorColor = [UIColor colorWithRed:255/255.0 green:255/255.0 blue:0 alpha:255/255.0]; self.tableView.separatorStyle =...
阅读全文
ios UITableView背景图片设置
摘要:- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 ...
阅读全文
ios初识UITableView及简单用法一
摘要:// // ViewController.m // ZQRTableViewTest // // Created by zzqqrr on 17/8/24. // Copyright (c) 2017年 zzqqrr. All rights reserved. // #import "ViewController.h" @interface ViewController () @...
阅读全文
ios轮播图片用法
摘要:// // ZQRViewController.m // 04-图片轮播器 // // Created by apple on 17-08-24. // Copyright (c) 2017年 zzqqrr. All rights reserved. // #define ZQRImageCount 5 #import "ZQRViewController.h" @interfa...
阅读全文
ios scrollView代理的用法
摘要:// // ZQRViewController.m // 03-图片缩放 // // Created by apple on 17-08-25. // #import "ZQRViewController.h" @interface ZQRViewController () @property (weak, nonatomic) IBOutlet UIScrollView *scro...
阅读全文
ios中scrollView基本用法
摘要:设置scrollView内容的尺寸(滚动的范围) self.scrollView.contentSize = CGSizeMake(892, 480); self.scrollView.contentSize = self.minionView.image.size; self.scrollView.contentSize = self.minio...
阅读全文
ios遮罩层的简单使用
摘要:/** 大图 */ - (IBAction)bigImg { //1.添加按钮遮罩层 UIButton *cover=[[UIButton alloc] init]; cover.frame=self.view.bounds; cover.backgroundColor=[UIColor blackColor]; cover.alpha=0.0; ...
阅读全文
ios九宫格算法
摘要:- (void)viewDidLoad { [super viewDidLoad]; //1.总列数(一行最多3列) int totalColumns=3; CGFloat appW=50; CGFloat appH=50; //2.间隙=(控制器的view的宽度-3*应用宽度)/4 CGFloat margin=(self.view.fr...
阅读全文
ios中字典转模型的创建以及简单用法
摘要:// appModel.h // Created by zzqqrr on 17/8/19. // #import @interface appModel : NSObject @property (nonatomic,copy) NSString *title; @property (nonatomic,copy) NSString *icon; - (id)initWithDict:...
阅读全文
UIIimageView读取图片的两种方式及动画的执行
摘要:/**count:图片数量 name:图片名称*/ - (void)runAnimationWithCount:(int)count name:(NSString *)name { if(self.tom.isAnimating)return;//如果动画正在执行就不重复执行 NSMutableArray *images=[NSMutableArray array];//创建一个...
阅读全文
ios九宫格算法
摘要:- (void)viewDidLoad { [super viewDidLoad]; //1.总列数(一行最多3列) int totalColumns=3; CGFloat appW=50; CGFloat appH=50; //2.间隙=(控制器的view的宽度-3*应用宽度)/4 CGFloat margin=(self.view.fr...
阅读全文
ios中字典转模型的创建以及简单用法
摘要:// appModel.h // Created by zzqqrr on 17/8/19. // #import @interface appModel : NSObject @property (nonatomic,copy) NSString *title; @property (nonatomic,copy) NSString *icon; - (id)initWithDict:...
阅读全文
UIIimageView读取图片的两种方式及动画的执行
摘要:/**count:图片数量 name:图片名称*/ - (void)runAnimationWithCount:(int)count name:(NSString *)name { if(self.tom.isAnimating)return;//如果动画正在执行就不重复执行 NSMutableArray *images=[NSMutableArray array];//创建一个...
阅读全文
ios读取plist文件:
摘要:@property (nonatomic,strong) NSArray *imageData;//定义一个数组 //懒加载数据 -(NSArray *)imageDate { if(_imageDate==nil) { NSBundle *bundle=[NSBundle mainBundle];//mainBundle可以获取手机的任何资源 NSString *path=[b...
阅读全文
ios手动添加数组字典(NSMutableDictionary)
摘要:@property (nonatomic,strong) NSArray *imageData;//定义一个数组 -(NSArray *)imageDate { if(_imageDate==nil) { NSMutableDictionary *image1=[NSMutableDictionary dictionary]; image1["icon"]=@"a"; image1["titl...
阅读全文