上一页 1 2 3 4 5 6 7 ··· 11 下一页

2016年11月15日

AFNetworking 网络错误提示data转换字符串

摘要: AFN在进行网络交互时,有时候会碰到返回502、500、404的时候。后台的总需要你配合他查出问题所在。但是AFN在返回数据序列化时解析错误只会转成NSData类型的数据,如果直接扔给后台Data的数据显然有点不靠谱。所以可以在AFURLResponseSerialization.m中加上对data 阅读全文

posted @ 2016-11-15 17:41 MJ_Angel 阅读(2313) 评论(0) 推荐(0) 编辑

常见HTTP错误代码

摘要: 一些常见的状态码为: 200 - 服务器成功返回网页 404 - 请求的网页不存在 503 - 服务不可用 详细分解: 1xx(临时响应) 表示临时响应并需要请求者继续执行操作的状态代码。 代码 说明 100 (继续) 请求者应当继续提出请求。服务器返回此代码表示已收到请求的第一部分,正在等待其余部 阅读全文

posted @ 2016-11-15 17:37 MJ_Angel 阅读(181) 评论(0) 推荐(0) 编辑

2016年10月26日

NSString类里有个hash

摘要: 实际编程总会涉及到比较两个字符串的内容,一般会用 [string1 isEqualsToString:string2] 来比较两个字符串是否一致。对于字符串的isEqualsToString方法,需要逐个比较字符串的内容,是比较耗时的操作。 偶然间我发现NSString类里有个hash方法,作用是返 阅读全文

posted @ 2016-10-26 12:52 MJ_Angel 阅读(596) 评论(0) 推荐(0) 编辑

2016年10月25日

@dynamic关键字

摘要: @dynamic You use the@dynamic keyword to tell the compiler that you will fulfill the API contract implied by a property either by providing method impl 阅读全文

posted @ 2016-10-25 15:27 MJ_Angel 阅读(464) 评论(0) 推荐(0) 编辑

2016年10月19日

Runtime

摘要: (一)[self class] 与 [super class] 下面代码输出什么@implementation Son : Father - (id)init { self = [super init]; if (self) { NSLog(@"%@", NSStringFromClass([sel 阅读全文

posted @ 2016-10-19 17:37 MJ_Angel 阅读(284) 评论(0) 推荐(0) 编辑

2016年9月19日

iOS调用系统电话、浏览器、地图、邮件等

摘要: - (IBAction)openMaps { //打开地图 NSString*addressText = @"beijing"; //@"1Infinite Loop, Cupertino, CA 95014"; addressText =[addressText stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]... 阅读全文

posted @ 2016-09-19 18:15 MJ_Angel 阅读(251) 评论(0) 推荐(0) 编辑

oc中调用c函数 实现将字符串转换成unsigned char

摘要: 帮助码友解决问题,从而复习了一下oc中调用c函数的方式 1,新建c 头文件 test.h 定义 c 函数 2,新建 c 实现文件,新建模板选中 c File test.c 3.实现函数 4,oc 中调用,引用 c 头文件 test.h 阅读全文

posted @ 2016-09-19 11:29 MJ_Angel 阅读(2580) 评论(0) 推荐(0) 编辑

2016年9月18日

Xcode功能快捷键

摘要: 隐藏xcode command+h退出xcode command+q关闭窗口 command+w关闭所有窗口 command+option+w关闭当前项目 command+control+w关闭当前文件 command+shift+w保存文件 command+s保存所有文件 command+opti 阅读全文

posted @ 2016-09-18 14:59 MJ_Angel 阅读(198) 评论(0) 推荐(0) 编辑

2016年9月6日

implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in c99

摘要: 问题:implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in c99 解决办法: 在出现该问题的函数前后加上 #if TARGET_OS_MAC && !TARGET_OS_IPHONE #endif 阅读全文

posted @ 2016-09-06 11:10 MJ_Angel 阅读(417) 评论(0) 推荐(0) 编辑

Undefined symbols for architecture arm64:问题

摘要: Undefined symbols for architecture arm64: "_sqlite3_prepare_v2", referenced from: +[HMJSchoolTool queryWithCondition:] in HMJSchoolTool.o "_sqlite3_st 阅读全文

posted @ 2016-09-06 11:09 MJ_Angel 阅读(2826) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 11 下一页

导航