1
2
| defaults write -app Xcode NSFontPanelAttributes -string "1,0"
重启Xcode生效
|
1
2
3
4
| gem sources -l 当前
gem sources --remove http://rubygems.org/ 删除
gem sources -a http://mirrors.ustc.edu.cn/ 添加
http://ruby.taobao.org
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| 第一步:安装rvm
$ curl -L get.rvm.io | bash -s stable
$ source ~/.rvm/scripts/rvm
rvm -v
如果能显示版本好则安装成功了。
列出ruby可安装的版本信息
rvm list known
安装一个ruby版本
rvm install 2.2.2
安装Cocoapods
sudo gem install -n /usr/local/bin cocoapods
pod setup
|
1
| rpl "bbbbb" "aaaaa" ./*
|
1
2
3
4
5
6
7
8
9
10
11
| + (CLLocation *)AMapLocationFromBaiduLocation:(CLLocation *)BaiduLocation;
{
const double x_pi = M_PI * 3000.0 / 180.0;
double x = BaiduLocation.coordinate.longitude - 0.0065, y = BaiduLocation.coordinate.latitude - 0.006;
double z = sqrt(x * x + y * y) - 0.00002 * sin(y * x_pi);
double theta = atan2(y, x) - 0.000003 * cos(x * x_pi);
double AMapLongitude = z * cos(theta);
double AMapLatitude = z * sin(theta);
CLLocation *AMapLocation = [[CLLocation alloc] initWithLatitude:AMapLatitude longitude:AMapLongitude];
return AMapLocation;
} 方案2(高德官方版)
|
1
| http://restapi.amap.com/v3/assistant/coordinate/convert?locations=longitude,latitude&coordsys=baidu&key=AMapWebAPIKey
|
1
2
| [http]
postBuffer = 524288000
|