摘要: #import "ViewController.h"#import @interface ViewController ()@property(nonatomic,strong)CLLocationManager *manager;@end@implementation ViewController... 阅读全文
posted @ 2015-07-17 21:54 汤冉阳 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 1.添加MapKit.framework框架 ,在plist中添加字段,用于,获取用户当前位置设置 NSLocationAlwaysUsageDescription2.代码#import "ViewController.h"#import @interface ViewController ()@p... 阅读全文
posted @ 2015-07-17 21:51 汤冉阳 阅读(1131) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"#import @interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; //地理编码 [... 阅读全文
posted @ 2015-07-17 20:30 汤冉阳 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 1. ios7只要开始定位,系统就会自动要求你对应用程序授权 ios8之后,必须要代码中实现要求用户对应用程序授权 ,在plist中添加以下两个属性 NSLocationWhenInUseDescription,允许在前台获取GPS的描述 NSLocationAlwaysUsageDesc... 阅读全文
posted @ 2015-07-17 20:27 汤冉阳 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 1.安装a. 查看源gem sources -lb. 设置源: sudo gem sources -a http://ruby.taobao.orgc. 删除源:sudo gem sources -r https://rubygems.org/d. 安装cocoaPads: sudo gem ins... 阅读全文
posted @ 2015-07-10 00:30 汤冉阳 阅读(594) 评论(0) 推荐(0) 编辑
摘要: 1.安装 1>Github上下载Alcatraz,下载地址:https://github.com/supermarin/Alcatraz 2>Alcatraz是xcode的插件,这个插件的作用是管理插件 3>安装完插件之会在Xcode工具栏-->window中出现Package Manager 4>... 阅读全文
posted @ 2015-07-06 08:44 汤冉阳 阅读(359) 评论(0) 推荐(0) 编辑
摘要: 我们知道,使用NSURLConnection的代理方法下载网页,存到一个NSData中, NSMutableData *pageData; [pageData appendData:data]; 如果网页编码是UTF-8的,可以这么转换为字符串: NSString *pageSource =... 阅读全文
posted @ 2015-07-03 00:20 汤冉阳 阅读(523) 评论(0) 推荐(0) 编辑
摘要: 01-时间和毫秒数的相互转换//获取毫秒数的时间戳long inter = [[NSDate date] timeIntervalSince1970]*1000;NSLog(@"%ld",inter);//把毫秒数转换成时间NSDate *date = [NSDate dateWithTimeInt... 阅读全文
posted @ 2015-07-03 00:17 汤冉阳 阅读(1233) 评论(0) 推荐(0) 编辑
摘要: /*** 上传多个文件** @param url 请求接口地址* @param filedata 文件名称和数据(key:value)* @param btnName 上传网页的btn (接口)* @param parms 附加上传参数*/-(void)httpSendDataWithUrl:... 阅读全文
posted @ 2015-07-02 23:56 汤冉阳 阅读(438) 评论(0) 推荐(0) 编辑
摘要: 1.UIImage转换为NSDataNSData *data;if (UIImagePNGRepresentation(image) == nil) {data = UIImageJPEGRepresentation(image, 1);} else {data = UIImagePNGRepres... 阅读全文
posted @ 2015-07-02 23:26 汤冉阳 阅读(976) 评论(0) 推荐(0) 编辑