部分需求修改
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
#import "DDMANaviManager.h"
|
||||
#import <AMapNaviKit/AMapNaviKit.h>
|
||||
@interface DDMANaviManager ()
|
||||
@interface DDMANaviManager () <AMapNaviCompositeManagerDelegate>
|
||||
@property (nonatomic, strong)AMapNaviCompositeManager *compositeManager;
|
||||
@end
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
- (AMapNaviCompositeManager *)compositeManager{
|
||||
if (!_compositeManager) {
|
||||
_compositeManager = [[AMapNaviCompositeManager alloc] init];
|
||||
_compositeManager.delegate = self;
|
||||
}
|
||||
return _compositeManager;
|
||||
}
|
||||
@@ -69,4 +70,13 @@
|
||||
[strongSelf.compositeManager presentRoutePlanViewControllerWithOptions:config];
|
||||
});
|
||||
}
|
||||
|
||||
// MARK: <AMapNaviCompositeManagerDelegate>
|
||||
- (void)compositeManager:(AMapNaviCompositeManager *)compositeManager didArrivedDestination:(AMapNaviMode)naviMode {
|
||||
__weak typeof(self) weakSelf = self;
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
__strong typeof(weakSelf) strongSelf = weakSelf;
|
||||
[strongSelf.compositeManager dismissWithAnimated:YES];
|
||||
});
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user