摘要: 创建字典 clear(self) 移除字典中所有的元素 get(self, k, d=None) 根据k返回字典中所对应的值 items(self) 返回字典中所有的键值对 keys(self) 返回字典中所有的key values(self) 返回字典中所有的value in 可见检查指定key是 阅读全文
posted @ 2017-06-21 07:31 斌哥骑猿看唱本 阅读(628) 评论(0) 推荐(0) 编辑
摘要: capitalize() 字符串首字母大写 center(width, fillchar=None) 将字符串放在中间;在制定长度下,首尾以指定字符填充 count(sub, start=None, end=None) 计算某字符在字符串中的数量 decode(encoding=None, erro 阅读全文
posted @ 2017-06-20 20:14 斌哥骑猿看唱本 阅读(1883) 评论(0) 推荐(0) 编辑
摘要: runtime : 运行时机制 首先必须明白的: 1.是什么 1> runtime是一套比较底层的纯C语言API, 属于1个C语言库, 包含了很多底层的C语言API 2> 平时编写的OC代码, 在程序运行过程中, 其实最终都是转成了runtime的C语言代码, runtime算是OC的幕后工作者 下... 阅读全文
posted @ 2015-09-21 11:55 斌哥骑猿看唱本 阅读(161) 评论(0) 推荐(0) 编辑
摘要: //创建 self.segmented =[[UISegmentedControl alloc]initWithItems:@[@"推荐阅读",@"我的订阅"]]; //设置大小 _segmented.frame = CGRectMake(0.0, 0.0, 200, 30.0)... 阅读全文
posted @ 2015-09-16 22:17 斌哥骑猿看唱本 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 1.AFHTTPRequestOperationManager*manager=[AFHTTPRequestOperationManagermanager]; 所有的网络请求,均有manager发起 2.需要注意的是,默认提交请求的数据是二进制的,返回格式是JSON 3.请求格式 AFHTTPReq... 阅读全文
posted @ 2015-09-15 22:20 斌哥骑猿看唱本 阅读(301) 评论(0) 推荐(0) 编辑
摘要: //定位 需要在info中添加NSLocationWhenInUseUsageDescription if ([[UIDevice currentDevice].systemVersion doubleValue]>=8.0) { //获取权限 [self.locat... 阅读全文
posted @ 2015-09-15 15:29 斌哥骑猿看唱本 阅读(512) 评论(0) 推荐(0) 编辑
摘要: //.h文件#pragma mark---地理编码- (IBAction)geocode:(UIButton *)sender;@property (strong, nonatomic) IBOutlet UITextField *addressTextField;@property (strong... 阅读全文
posted @ 2015-09-14 22:05 斌哥骑猿看唱本 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 1.就基本使用NSInvocationOperation//1.创建操作对象,封装需要执行的任务 NSInvocationOperation * operation =[[NSInvocationOperation alloc]initWithTarget:self selector:@sel... 阅读全文
posted @ 2015-09-11 12:11 斌哥骑猿看唱本 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 1.NSThread ①.开线程的几种方式 *先创建, 后启动 ②.其他用法 CGD(重点) 1.队列的类型 *并发队列:可以同时执行多个任务 获得全局的并发队列:dispatch_get_global_queue(<#long identifier#>, <#unsigned long flags 阅读全文
posted @ 2015-09-11 09:52 斌哥骑猿看唱本 阅读(151) 评论(0) 推荐(0) 编辑
摘要: UILabel * label =[[UILabel alloc]initWithFrame:CGRectMake(100, 200, 100, 100)]; label.backgroundColor=[UIColor cyanColor]; [self.view addSubview:labe... 阅读全文
posted @ 2015-09-09 21:55 斌哥骑猿看唱本 阅读(181) 评论(0) 推荐(0) 编辑