摘要: #import "HMViewController.h"@interface HMViewController () @end@implementation HMViewController- (void)viewDidLoad{ [super viewDidLoad];}// 任务:任何请求... 阅读全文
posted @ 2015-11-21 10:41 Z了个L 阅读(172) 评论(0) 推荐(0) 编辑
摘要: 下载小文件的方式 // 1.NSData dataWithContentsOfURLdispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ // 其实这就是一个GET请求 NSUR... 阅读全文
posted @ 2015-11-20 20:33 Z了个L 阅读(182) 评论(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 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-20 19:28 Z了个L 阅读(123) 评论(0) 推荐(0) 编辑
摘要: HMDataTool.h#import @interface HMDataTool : NSObject+ (instancetype)sharedDataTool;@endHMDataTool.m#import "HMDataTool.h"@implementation HMDataTool// ... 阅读全文
posted @ 2015-11-20 15:36 Z了个L 阅读(108) 评论(0) 推荐(0) 编辑
摘要: HMDataTool.h#import @interface HMDataTool : NSObject+ (instancetype)sharedDataTool;@endHMDataTool.m#import "HMDataTool.h"@implementation HMDataTool// ... 阅读全文
posted @ 2015-11-20 15:02 Z了个L 阅读(123) 评论(0) 推荐(0) 编辑
摘要: static 修饰变量:1>修饰全局变量:*全局变量的作用域仅限于当前文件内部2>修饰局部变量:*局部变量的生命周期 跟 全局变量类似*但是不能改变作用域*但能保证局部变量永远只初始化1次,在程序运行过程中,永远只有1份内存 阅读全文
posted @ 2015-11-20 14:46 Z了个L 阅读(116) 评论(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 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-19 09:57 Z了个L 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2015-11-19 08:46 Z了个L 阅读(130) 评论(0) 推荐(0) 编辑