`
文章列表
  1、前期工作       注册百度开发者帐号       生成密钥       下载百度地图api       在xcode进行配置 2、让百度地图跑起       在程序的AppDelegate代码如下:        manger = [[BMKMapManageralloc]init               ];         self.controller = [[ViewController alloc]init];         self.window = [[UIWindow alloc]initWithFrame:[[UIScreen main ...
    可以使用CocoaPods在github上下载源码,这个库擅长处理从Web API上请求的数据,用法如下:   NSURL *twitterSearch = [NSURLURLWithString:@"http://api.douban.com/v2/book/search?tag=computer"];     NSData *data = [NSData dataWithContentsOfURL:twitterSearch];     NSDictionary *json = [NSJSONSerializationJSONObjectWithDa ...
在plist文件中 将Supported interface orientations这个条目的所有子项设置为Portrait (bottom home button)
前期工作: 1、一部苹果设备,iphone或者itouch 2、苹果开发者 3、在https://www.jpush.cn/注册jpush   证书 1、在开发者中心申请AppID,下载生成的证书,双击安装后,在到钥匙串导出。 2、在设备上安装provisioning prodfile,选择刚才生成的AppID,选择设备后下载双击安装到手机,这样我们就能获取设备的devoiceToken了。 3、下载jpush的SDK并导入到工程。 4、创建PushConfig.plist文件,里面有三个key-value如下
  代码   - (void)callGoogleMap :(NSString*)place {     CLGeocoder *gencoder = [[CLGeocoder alloc]init];     [gencoder geocodeAddressString:place completionHandler:^(NSArray *placemarks,NSError *error){                  //编码结束后返回的是CLPlacemark实例的集合         CLPlacemark *placemark = placemarks[0 ...
  上代码   - (void)callAppleMap :(NSString*)place {     CLGeocoder *gencoder = [[CLGeocoder alloc]init];     [gencoder geocodeAddressString:place completionHandler:^(NSArray *placemarks,NSError *error){              //编码结束后返回的是CLPlacemark实例的集合         CLPlacemark *placemark = placemarks[0]; ...
  用到的类 MKMapView 设置MKMapView实例的一些属性,并且指定的伪托就可以进行用户的位置跟踪   这些属性是       _mapView.showsUserLocation = YES; //是否允许进行位置跟踪       [_mapViewsetUserTrackingMode:MKUserTrackingModeFollowWithHeadinganimated:YES];//位置跟踪模式   需要实现的委托是   - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUs ...
  用到的类 CLGeocoder,用到的函数geocodeAddressString   上代码 - (void)encodeAddressToCoordinate :(NSString*)address {     CLGeocoder *encoder = [[CLGeocoder alloc]init];     [encoder geocodeAddressString:address completionHandler:^(NSArray *placemarks,NSError *error){              CLPlacemark *placema ...
  直接上代码   头文件 #import <UIKit/UIKit.h> #import <CoreLocation/CoreLocation.h> #import <AddressBook/AddressBook.h>   @interface ViewController : UIViewController<CLLocationManagerDelegate> {     CLLocationManager *locationManger; }   @end   .m文件   // //  ViewC ...
Global site tag (gtag.js) - Google Analytics