会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Z了个L
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
下一页
2015年11月21日
NSURLSession下载
摘要: #import "HMViewController.h"@interface HMViewController () @end@implementation HMViewController- (void)viewDidLoad{ [super viewDidLoad];}// 任务:任何请求...
阅读全文
posted @ 2015-11-21 10:41 Z了个L
阅读(175)
评论(0)
推荐(0)
2015年11月20日
下载小文件的方式
摘要: 下载小文件的方式 // 1.NSData dataWithContentsOfURLdispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // 其实这就是一个GET请求 NSUR...
阅读全文
posted @ 2015-11-20 20:33 Z了个L
阅读(187)
评论(0)
推荐(0)
简化单例模式
摘要: HMSingleton.h(这个可以直接copy过去,拿到项目中去用)文件名文件内容:// .h文件#define HMSingletonH(name) + (instancetype)shared##name;// .m文件#if __has_feature(objc_arc) #defin...
阅读全文
posted @ 2015-11-20 19:30 Z了个L
阅读(160)
评论(0)
推荐(0)
用宏来判断是否为ARC环境
摘要:
阅读全文
posted @ 2015-11-20 19:28 Z了个L
阅读(127)
评论(0)
推荐(0)
单例模式之懒汉模式(GCD实现)-----非ARC
摘要: HMDataTool.h#import @interface HMDataTool : NSObject+ (instancetype)sharedDataTool;@endHMDataTool.m#import "HMDataTool.h"@implementation HMDataTool// ...
阅读全文
posted @ 2015-11-20 15:36 Z了个L
阅读(111)
评论(0)
推荐(0)
单例模式之懒汉模式(GCD实现)
摘要: HMDataTool.h#import @interface HMDataTool : NSObject+ (instancetype)sharedDataTool;@endHMDataTool.m#import "HMDataTool.h"@implementation HMDataTool// ...
阅读全文
posted @ 2015-11-20 15:02 Z了个L
阅读(128)
评论(0)
推荐(0)
static
摘要: static 修饰变量:1>修饰全局变量:*全局变量的作用域仅限于当前文件内部2>修饰局部变量:*局部变量的生命周期 跟 全局变量类似*但是不能改变作用域*但能保证局部变量永远只初始化1次,在程序运行过程中,永远只有1份内存
阅读全文
posted @ 2015-11-20 14:46 Z了个L
阅读(119)
评论(0)
推荐(0)
单例模式之懒汉模式
摘要: HMMusicTool.h#import @interface HMMusicTool : NSObject+ (instancetype)sharedMusicTool;@endHMMusicTool.m#import "HMMusicTool.h"@implementation HMMusicT...
阅读全文
posted @ 2015-11-20 12:40 Z了个L
阅读(172)
评论(0)
推荐(0)
2015年11月19日
发送json给服务器
摘要:
阅读全文
posted @ 2015-11-19 09:57 Z了个L
阅读(162)
评论(0)
推荐(0)
常见响应状态码
摘要:
阅读全文
posted @ 2015-11-19 08:46 Z了个L
阅读(134)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
下一页
公告