diff --git a/GHGestureDemo.xcodeproj/project.pbxproj b/GHGestureDemo.xcodeproj/project.pbxproj index c0d42aa..6ff4a43 100644 --- a/GHGestureDemo.xcodeproj/project.pbxproj +++ b/GHGestureDemo.xcodeproj/project.pbxproj @@ -384,8 +384,8 @@ D6B2054B225B49A4004849E5 /* Controller */ = { isa = PBXGroup; children = ( - D6B2054C225B49A4004849E5 /* GHGestureDraggingViewController.m */, D6B2054D225B49A4004849E5 /* GHGestureDraggingViewController.h */, + D6B2054C225B49A4004849E5 /* GHGestureDraggingViewController.m */, ); path = Controller; sourceTree = ""; @@ -393,10 +393,10 @@ D6B2054E225B49A4004849E5 /* View */ = { isa = PBXGroup; children = ( - D6B2054F225B49A4004849E5 /* GHGestureDraggingHeader.m */, D6B20550225B49A4004849E5 /* GHGestureDraggingCell.h */, D6B20551225B49A4004849E5 /* GHGestureDraggingView.h */, D6B20552225B49A4004849E5 /* GHGestureDraggingHeader.h */, + D6B2054F225B49A4004849E5 /* GHGestureDraggingHeader.m */, D6B20553225B49A4004849E5 /* GHGestureDraggingCell.m */, D6B20554225B49A4004849E5 /* GHGestureDraggingView.m */, ); diff --git a/GHGestureDemo/AppDelegate.m b/GHGestureDemo/AppDelegate.m index a32e9cf..43d6b5f 100644 --- a/GHGestureDemo/AppDelegate.m +++ b/GHGestureDemo/AppDelegate.m @@ -11,6 +11,7 @@ #import "GHViewController.h" #import "GHGestureDraggingViewController.h" #import "GHGestureCropImagViewController.h" +#import //引入base相关所有的头文件 @interface AppDelegate () @@ -21,6 +22,15 @@ @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { + BMKMapManager *mapManager = [[BMKMapManager alloc] init]; + // 如果要关注网络及授权验证事件,请设定generalDelegate参数 + BOOL ret = [mapManager start:@"wylgGGST0EmCvbi7rqG5QkIBkG8IWGlf" generalDelegate:nil]; + if (!ret) { + NSLog(@"manager start failed!"); + } + + [BMKMapManager setCoordinateTypeUsedInBaiduMapSDK: BMK_COORDTYPE_COMMON]; + UIWindow *window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; self.window = window; #ifdef DEVELOPMENT0 diff --git a/GHGestureDemo/GHGestureCropImageDemo.plist b/GHGestureDemo/GHGestureCropImageDemo.plist index 9bdc69e..a48323a 100644 --- a/GHGestureDemo/GHGestureCropImageDemo.plist +++ b/GHGestureDemo/GHGestureCropImageDemo.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + 手势练习 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/GHGestureDemo/GHGestureDraggingDemo.plist b/GHGestureDemo/GHGestureDraggingDemo.plist index 9bdc69e..a48323a 100644 --- a/GHGestureDemo/GHGestureDraggingDemo.plist +++ b/GHGestureDemo/GHGestureDraggingDemo.plist @@ -4,6 +4,8 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + 手势练习 CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier diff --git a/GHGestureDraggingDemo/Controller/GHGestureDraggingViewController.m b/GHGestureDraggingDemo/Controller/GHGestureDraggingViewController.m index c910feb..71a6b67 100644 --- a/GHGestureDraggingDemo/Controller/GHGestureDraggingViewController.m +++ b/GHGestureDraggingDemo/Controller/GHGestureDraggingViewController.m @@ -9,8 +9,11 @@ #import "GHGestureDraggingViewController.h" #import "UIView+Extension.h" #import "GHGestureDraggingView.h" +#import //引入base相关所有的头文件 +#import //引入地图功能所有的头文件 -@interface GHGestureDraggingViewController () +@interface GHGestureDraggingViewController () +@property (nonatomic, strong) BMKMapView *mapView; @property (nonatomic , strong) GHGestureDraggingView *testView; @end @@ -25,6 +28,9 @@ - (void)viewWillAppear:(BOOL)animated { - (void)viewDidLoad { [super viewDidLoad]; + self.mapView = [[BMKMapView alloc]initWithFrame:self.view.bounds]; + self.mapView.delegate = self; + [self.view addSubview:self.mapView]; self.view.backgroundColor = [UIColor orangeColor]; @@ -34,6 +40,7 @@ - (void)viewDidLoad { panGest.minimumNumberOfTouches = 1; [self.testView addGestureRecognizer:panGest]; + } - (void)panView:(UIPanGestureRecognizer *)panGest { @@ -52,8 +59,8 @@ - (void)panView:(UIPanGestureRecognizer *)panGest { if (velocity.y < 0) { [UIView animateWithDuration:0.25 animations:^{ - self.testView.y = kSafeAreaTopHeight; - self.testView.height = kScreenHeight - kSafeAreaTopHeight; + self.testView.y = kStatusBarHeight; + self.testView.height = kScreenHeight - kStatusBarHeight; } completion:^(BOOL finished) { }]; diff --git a/GHGestureDraggingDemo/View/GHGestureDraggingHeader.m b/GHGestureDraggingDemo/View/GHGestureDraggingHeader.m index 308c32e..1d9acec 100644 --- a/GHGestureDraggingDemo/View/GHGestureDraggingHeader.m +++ b/GHGestureDraggingDemo/View/GHGestureDraggingHeader.m @@ -48,9 +48,12 @@ - (void)setupUI { - (UIButton *)timeNavigation { if (_timeNavigation == nil) { _timeNavigation = [[UIButton alloc]init]; - _timeNavigation.backgroundColor = [UIColor redColor]; + _timeNavigation.layer.masksToBounds = YES; + _timeNavigation.layer.borderWidth = 0.5; + _timeNavigation.layer.borderColor = [UIColor lightGrayColor].CGColor; + _timeNavigation.layer.cornerRadius = 5; [_timeNavigation setTitle:@"实时导航" forState:UIControlStateNormal]; - [_timeNavigation setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal]; + [_timeNavigation setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal]; _timeNavigation.titleLabel.font = [UIFont systemFontOfSize:15]; } return _timeNavigation; diff --git a/Podfile b/Podfile index 092a749..03cc91a 100644 --- a/Podfile +++ b/Podfile @@ -1,6 +1,8 @@ # Uncomment the next line to define a global platform for your project - platform :ios, '7.0' + +platform :ios, '7.0' pod 'Masonry', '1.0.0' +pod 'BaiduMapKit','4.3.0' target 'GHGestureCropImageDemo' do # Uncomment the next line if you're using Swift or would like to use dynamic frameworks diff --git a/Podfile.lock b/Podfile.lock index 8548673..1bf0741 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -3,7 +3,7 @@ PODS: - Masonry (1.0.0) DEPENDENCIES: - - BaiduMapKit (~> 4.3.0) + - BaiduMapKit (= 4.3.0) - Masonry (= 1.0.0) SPEC REPOS: @@ -15,6 +15,6 @@ SPEC CHECKSUMS: BaiduMapKit: 63575d9236b4112c4ff76391df637f2a6dc1ada8 Masonry: b529bb169217897b6354d4b56b1fada6d475b13d -PODFILE CHECKSUM: d06baeac5a73a25fc3765ba10043eff4c47d65c7 +PODFILE CHECKSUM: 5a337c05fa073d92b488c6a449f349452e66ad40 COCOAPODS: 1.5.3