iOS
Eric陈
这个作者很懒,什么都没留下…
展开
-
iOS字符串替换,字符插入,字符删除
1.字符串替换,(删除也可以用空白替换)方法:- stringByReplacingOccurrencesOfString:withString:options:range:样例: NSString * string=@"2016-05-05"; string=[string stringByReplacingOccurrencesOfString:@"-"w原创 2016-05-05 17:24:37 · 1031 阅读 · 0 评论 -
iOS 在价格数字中插入分隔符,逗号,点之类的方法和代码
原创 2016-05-05 17:27:07 · 3823 阅读 · 0 评论 -
UIAlertViewController弹出控件代码集成5步
1.控制器UIAlertController *alertController = [UIAlertControlleralertControllerWithTitle:nilmessage:@"是否继续跑步?"preferredStyle:UIAlertControllerStyleAlert];2.action继续 UIAlertAction *okAct原创 2016-06-08 14:46:27 · 457 阅读 · 0 评论 -
将字符串分解为数组
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:60*60*24*self.index]; // NSLog(@"--index:%zd",self.index); NSDateFormatter *formatter = [[NSDateFormatter alloc]init]; formatter.d原创 2016-11-29 16:15:59 · 330 阅读 · 0 评论 -
解决XCode8 Protocol not available, dumping backtrace问题
转自:http://www.w2bc.com/article/177485一 问题描述nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available, dumping backtrace: [x86_64] libnetcore-856.1.8转载 2016-12-04 14:18:39 · 1512 阅读 · 0 评论 -
layoutAttributesForElementsInRect: Logging only once for UICollectionViewFlowLayout cache mismatched
转自:http://codecloud.net/14916.html最近使用UICollectionView自定义布局的时候报了个提示,看着特别烦提示:2016-07-08 16:26:38.346 YiTong[27847:733016] Logging only once for UICollectionViewFlowLayout cache mismatched frame20转载 2016-12-04 14:34:05 · 1219 阅读 · 0 评论 -
单独设置UicollectionView的一个cell的宽度
1.想单独改变一个cell的宽度,与其他的cell宽度不同,并且保持间距相等,需要封装一个BaseCollectionViewFlowLayout类.h文件#import @protocol BaseCollectionViewFlowLayoutDelegate UICollectionViewDelegateFlowLayout>@e原创 2016-12-04 17:06:04 · 2805 阅读 · 0 评论 -
iOS实战之后台返回数据为空造成程序崩溃
方法一:使用AFNetworking进行请求过滤设置:((AFJSONResponseSerializer *)manager.responseSerializer).removesKeysWithNullValues = YES;方法二:使用runtime来给类别增加属性NSNull+Safe.m#import #import static NSStrin转载 2017-03-30 16:33:08 · 1011 阅读 · 0 评论 -
升级10.12,想要允许任何来源应用
进这帖子的人应该都知道,在升级了macOS Sierra (10.12)版本后在“安全性与隐私”中不再有“任何来源”选项,如下图:这可不是好消息,若我们想要装一些收费却很好用,想用却米粒不足,有资源却要允许任何来源的朋友就不知该怎么办了。经研究发现(好像网上也已经有人给出办法啦)其实只要用我们万能的终端,这个问题还是能迎刃而解。接下来,我们就打开终端,然后输转载 2017-04-15 15:36:05 · 335 阅读 · 0 评论 -
Trigger script exited with code: 1 From https://github.com/CocoaPods/Specs 9967bbf..de7b3da master -
os x server 测试时报错,信息如下,有谁知道什么原因吗?有没有遇到相同问题的人?Trigger script exited with code: 1 From https://github.com/CocoaPods/Specs9967bbf..de7b3da master -> origin/master原创 2016-04-19 20:06:12 · 1190 阅读 · 0 评论 -
iOS字体包导入过程
iOS导入字体包:1.将所用到的字体包导入xcode2.在info.plist里新建一个Fonts provided by application(array),将字体名称填入3.在工程build phases->copy bundle resources中查看文件是否添加成功4.自定义方法,将字体名称一一对应放入原创 2016-05-09 15:55:23 · 1112 阅读 · 0 评论 -
iOS倒计时的实现
iOS倒计时的实现,显示剩余天、时、分、秒做项目中经常会遇到秒杀、抢商品啊等等。那么这个十分秒的倒数是如何代码实现的呢!Demo地址:https://github.com/zhengwenming/countDown原创 2016-01-08 09:46:46 · 312 阅读 · 0 评论 -
iOS 检测网络连接
最近遇到需要检测网络状况的情况,在YYkit和AF里面有相关代码,供查阅。//// YYReachability.h// YYKit https://github.com/ibireme/YYKit>//// Created by ibireme on 15/2/6.// Copyright (c) 2015 ibir原创 2016-01-11 16:25:01 · 756 阅读 · 0 评论 -
iOS oc可变数组排序方法
@property (nonatomic,strong)NSMutableArray * loadAllStylist;-(NSMutableArray *)loadAllStylist{ if (!_loadAllStylist) { _loadAllStylist = [NSMutableArrayarray];原创 2015-12-18 21:01:30 · 1000 阅读 · 0 评论 -
iOS 测试入门 XCTest入门(一)
1.Introducing the Test Navigator你可以在Xcode左上角打开下面红色框框内的标志进入测试界面,列表展示测试类名和一些测试用例方法名。2.鼠标移到下图打勾或者打X位置,你将会看到启动按钮图标,点击可以快速启动运行你的测试,你可以选择同时测试,或者测试一个类或者单独测试一个方法,Xcode会快速给你结果,测试通过是绿色的打勾,测试失败是X。3.创建一原创 2016-01-12 19:56:29 · 872 阅读 · 0 评论 -
断言测试
断言测试下面一共18个断言(SDK中也是18个,其含义转自ios UnitTest 学习笔记,真心佩服原文的博主,部分宏小弟已经测试过):XCTFail(format…) 生成一个失败的测试; XCTAssertNil(a1, format...)为空判断,a1为空时通过,反之不通过; XCTAssertNotNil(a1, format…)不为空判断,a1不为空时转载 2016-01-13 12:21:52 · 729 阅读 · 0 评论 -
xctool及一些相关的资料
2000年Matin Fowler发表文章Continuous Integration【1】;2007年,Paul Duvall, Steve Matyas和 Andrew Glover合著的《Continuous Integration:Improving Software Quality and Reducing Risk》 【2】出版发行,该书获得了2008年的图灵大奖。持续集成理念经过10转载 2016-01-13 14:20:11 · 372 阅读 · 0 评论 -
如何使用 Xcode Targets 管理开发和生产版本?iOS宏的使用
如何使用 Xcode Targets 管理开发和生产版本?在开始此教程之前,我们假设你已经完成了应用程序的开发和测试,现在准备提交生产发布。问题是,某些 Web 服务 URLs 指向测试服务器,而 API keys 则为测试环境而配置。在提交应用程序给苹果审核之前,你需要修改所有这些 API keys 和 URLs以适应生产环境。这很正常,对吧?但是,除了将这些值在开发和生产环转载 2016-04-26 12:25:58 · 503 阅读 · 0 评论 -
iOS单元测试,String类型的宏,单个类测试可以正常取到,多个类一起测试取到的宏为null
原创 2016-04-28 17:05:24 · 335 阅读 · 0 评论 -
苹果加速审核通道
develper.apple.com —> support —> contact apple developer support —> Distribution / Expediting an app review原创 2017-05-04 19:55:17 · 361 阅读 · 0 评论