Преглед изворни кода

1.修改iOS Apex & Drivers屏蔽Google地图。

Pen Li пре 8 година
родитељ
комит
002dd403a1

+ 18 - 18
Redant Drivers/Apex And Drivers/Detail/RAOrderDetailViewController+TableViewDataSource.m

@@ -93,29 +93,29 @@
     UIAlertController *alertVC = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
     
 //    __weak typeof(self) weakSelf = self;
-    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]]) {
-        
-        UIAlertAction *googleMapAction = [UIAlertAction actionWithTitle:@"Google Map" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
-            
-            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"]
-                                   stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
-            
-            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
-                NSLog(@"%u",success);
-            }];
-            
-//            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
-//            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
-            
-        }];
-        [alertVC addAction:googleMapAction];
-    }
+//    if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"comgooglemaps://"]]) {
+//
+//        UIAlertAction *googleMapAction = [UIAlertAction actionWithTitle:@"Google Map" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
+//
+//            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"]
+//                                   stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
+//
+//            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString] options:@{} completionHandler:^(BOOL success) {
+//                NSLog(@"%u",success);
+//            }];
+//
+////            NSString *urlString = [[NSString stringWithFormat:@"comgooglemaps://?center=37.782652,-122.410126&directionsmode=driving"] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
+////            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlString]];
+//
+//        }];
+//        [alertVC addAction:googleMapAction];
+//    }
     
     UIAlertAction *appleMapAction = [UIAlertAction actionWithTitle:@"Apple Map" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
         
         MKMapItem *currentLocation = [MKMapItem mapItemForCurrentLocation];
 //        MKMapItem *toLocation = [[MKMapItem alloc] initWithPlacemark:[[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(37.782652, -122.410126) addressDictionary:nil]];
-        
+        // @"东大街芷泉段6号"
         MKMapItem *toLocation = [[MKMapItem alloc] initWithPlacemark:[[MKPlacemark alloc] initWithCoordinate:kCLLocationCoordinate2DInvalid
                                                                                            addressDictionary:@{
                                                                                                                (__bridge id)kABPersonAddressStreetKey : model.location