2015年11月15日

摘要: 阅读别人含有block的代码时经常会看到这样一个现象:__weak __typeof(self)weakSelf = self;self.completionBlock = ^{__strong __typeof(weakSelf)strongSelf = weakSelf;};解释一下:weakS... 阅读全文
posted @ 2015-11-15 21:10 恒山之阳 阅读(239) 评论(0) 推荐(0) 编辑

2015年11月3日

摘要: 背景:最近在进行list页重构,list页的cell会有不同的展现形式,即同一个UITableView上多种cell并存。为了响应这种需求,我们考虑通过cell容器化的方式解决该问题。最理想的解决方法就是通过工厂模式来定制这些cell,当服务端告知我们某一个indexPath的cell的style时... 阅读全文
posted @ 2015-11-03 00:51 恒山之阳 阅读(1227) 评论(0) 推荐(0) 编辑

2015年10月29日

摘要: 这两天研究SDWebimage库,在xode 7上运行过程中遇到了些问题,创建的新项目由于使用到了https的图片URL,运行后,怎么都不出现图片,发送请求时,报下面的错:“App Transport Security has blocked a cleartext HTTP (http://) r... 阅读全文
posted @ 2015-10-29 14:27 恒山之阳 阅读(574) 评论(0) 推荐(0) 编辑

2015年10月12日

摘要: 自定义UI的基本结构.h文件@protocol TRIPHotelXXXViewDelegate - (void)actionA;@end@interface TRIPHotelXXXView : UIView@property (nonatomic,weak) id delegate;+ (in... 阅读全文
posted @ 2015-10-12 20:10 恒山之阳 阅读(237) 评论(0) 推荐(0) 编辑

2015年9月23日

摘要: 软件:QuickTime Player + PicGIF Lite下载地址:Apple Store步骤1:电脑屏幕录制 a.启动QuickTime Player,选择文件->新建屏幕录制->弹出交互框后点击红点开始->选择录制区域后点击开始录制。 b.录制完毕后,切换到QuickTime Pla... 阅读全文
posted @ 2015-09-23 23:48 恒山之阳 阅读(256) 评论(0) 推荐(0) 编辑

2015年9月22日

摘要: view初始化时增加通知:{code} //增加监听,当键盘出现或改变时收出消息 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboar... 阅读全文
posted @ 2015-09-22 17:49 恒山之阳 阅读(626) 评论(0) 推荐(0) 编辑

2015年9月18日

摘要: 查看、添加、提交、删除、找回,重置修改文件git help # 显示command的helpgit show # 显示某次提交的内容 git show $idgit co -- # 抛弃工作区修改git co . # 抛弃工作区修改git add # 将工作文件修改提交到本地暂存区git ad... 阅读全文
posted @ 2015-09-18 20:21 恒山之阳 阅读(146) 评论(0) 推荐(0) 编辑

2015年9月6日

摘要: if ([_info[@"cashBack"] floatValue] > 0) { y += 10.0; // 离店返金额说明 UILabel *cashBackLabel = [TRIPLabelFactory createLabelWithTe... 阅读全文
posted @ 2015-09-06 16:57 恒山之阳 阅读(458) 评论(0) 推荐(0) 编辑

2015年8月25日

摘要: //邮箱+ (BOOL) validateEmail:(NSString *)email{NSString *emailRegex = @"\\w+@[a-zA-Z_]+?\\.[a-zA-Z]{2,6}";NSPredicate *emailTest = [NSPredicate predicat... 阅读全文
posted @ 2015-08-25 08:44 恒山之阳 阅读(758) 评论(0) 推荐(0) 编辑

2015年7月15日

摘要: Mac OS 和 iOS 系统架构的对比图:从图上可以看出Mac OS和iOS的系统架构层次只有最上面一层不同,Mac是Cocoa框架,而iOS是Cocoa Touch框架,因此Mac OS开发和iOS开发是相似的。这里我只分析iOS的系统架构:一、核心操作系统层(Core OS layer): ... 阅读全文
posted @ 2015-07-15 18:13 恒山之阳 阅读(248) 评论(0) 推荐(0) 编辑

导航