startUpdatingHeading开发一个指北针
来源:互联网 发布:淘宝卖家开通直播 编辑:程序博客网 时间:2024/05/28 23:12
//// ViewController.m// ZhiNanZhen//// Created by hq on 16/5/17.// Copyright 2016年 hanqing. All rights reserved.//#import "ViewController.h"#import <CoreLocation/CoreLocation.h>@interface ViewController () <CLLocationManagerDelegate>@property(nonatomic,strong) CLLocationManager *clm;@property (weak, nonatomic) IBOutlet UIImageView *imgView;@end@implementation ViewController-(CLLocationManager *)clm{ if (_clm==nil) { _clm=[[CLLocationManager alloc] init]; _clm.delegate=self; } return _clm;}- (void)viewDidLoad { [super viewDidLoad]; [self.clm startUpdatingHeading]; }-(void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading{ /** * magneticHeading 表示磁北极偏转的角度 *trueHeading 磁北极的真实角度 *0.0 - 359.9 度, 0 being true North */ NSLog(@"%f",newHeading.magneticHeading); //将我们的角度转换为弧度 CGFloat angle=newHeading.magneticHeading/180.0*M_PI; [UIView animateWithDuration:0.2 animations:^{ //旋转我们的指南针 self.imgView.transform=CGAffineTransformMakeRotation(-angle); }];}- (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; }@end
0 0
- startUpdatingHeading开发一个指北针
- AE开发输出地图添加指北针
- 指北针设置
- ArcGIS 生成指北针
- 磁场传感器(指北针)
- 指南针为什么不叫指北针
- 出图时加上指北针的代码
- GlobeControl轨道飞行工具和显示指北针
- AE+C#向IPageLayout增加指北针
- Arcgis pagelayout 实现添加图名,比例尺,指北针
- AE c# 添加比例尺和指北针
- 鼠标拖动添加指北针,鼠标拖动的范围为指北针的范围
- ArcGIS Engine自定义工具类,实现添加图名,比例尺,指北针
- [ArcEngine地图制图系列]—添加地图指北针
- Windows下的指北针(指南针)--OpenGL版 Compass
- ArcEngine添加指北针、比例尺、图例(注意UID值)
- 功能实现_实现指北针(UI图片)效果
- 一个OWC开发范例
- jdbc.properties内容
- 为什么没安装支付宝客户端时没有跳H5网页?
- 《深入理解mybatis原理》 Mybatis初始化机制详解
- 题解:Mischievous Mess Makers
- Cannot run program "aapt": error=13, Permission denied
- startUpdatingHeading开发一个指北针
- 如何把本地数据库导入服务器
- Java NIO使用及原理分析(二)
- oracle数据库性能优化
- codeforces86D 莫队算法
- busybox find
- Android Studio添加第三方库
- 滚动条滚动,广告保持位置不变
- 蓝桥杯 填算式(JAVA)