摘要: 12.判断邮箱格式是否正确的代码://利用正则表达式验证-(BOOL)isValidateEmail:(NSString *)email{ NSString *emailRegex = @"[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,4}"; ... 阅读全文
posted @ 2014-11-25 12:51 糊涂人 阅读(476) 评论(0) 推荐(0) 编辑
摘要: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; CGPoint pt = [touch locationInView:self.view]... 阅读全文
posted @ 2014-11-12 18:56 糊涂人 阅读(824) 评论(0) 推荐(0) 编辑
摘要: //// UINavigationBar+JTDropShadow.h//// Created by james on 9/20/11.// http://ioscodesnippet.tumblr.com// #import @interface UINavigationBar (JTDr... 阅读全文
posted @ 2014-11-12 15:51 糊涂人 阅读(1216) 评论(0) 推荐(0) 编辑
摘要: //@mg:masksToBounds必须为NO否者阴影没有效果// cell.layer.masksToBounds = NO; cell.layer.contentsScale = [UIScreen mainScreen].scale; cell.layer.shadowOpacity... 阅读全文
posted @ 2014-11-12 15:42 糊涂人 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 这个属性设置为yes,是为了debug的时候编译速度更快,它只编译当前的architecture版本。而设置为no时,会编译所有的版本。这个是设备对应的architecture:armv6:iPhone 2G/3G,iPod 1G/2Garmv7:iPhone 3GS/4/4s,iPod 3G/4G... 阅读全文
posted @ 2014-11-12 13:33 糊涂人 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 1、下载ZXingObjc压缩包,解压缩。2、将文件拷贝到项目工程目录下3、到工程目录中ZXingObjc文件夹中将ZXing的执行文件拖拽到项目中。4、点击项目targets ——>Build Phases——>Target Dependencies添加ZXingObjC-iOS(ZXingObj... 阅读全文
posted @ 2014-11-12 11:26 糊涂人 阅读(1303) 评论(0) 推荐(0) 编辑
摘要: 首先在view上添加手势 UIPanGestureRecognizer1 UIPanGestureRecognizer *panGes = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(goAnimation... 阅读全文
posted @ 2014-11-12 00:01 糊涂人 阅读(386) 评论(0) 推荐(0) 编辑
摘要: 使用空白view取代cell- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ //取消选中颜色 UIView *backView = [[... 阅读全文
posted @ 2014-11-10 15:05 糊涂人 阅读(526) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; UIButton *btnTest = [UIButton buttonWithType:UIButtonTypeCustom];//不需要去刻意指定x,y的坐标,可以用CGRectZero ... 阅读全文
posted @ 2014-11-01 14:57 糊涂人 阅读(1126) 评论(1) 推荐(1) 编辑
摘要: //// BMDefineUtils.h// Sensoro Configuration Utility// @discussion 常用宏定义// Created by skyming on 14-4-15.// Copyright (c) 2014年 Sensoro. All righ... 阅读全文
posted @ 2014-10-31 12:06 糊涂人 阅读(254) 评论(0) 推荐(0) 编辑