diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-05-17 11:14:55 -0700 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-04-17 22:44:18 -0700 |
commit | 52abcb5a735471dc4bf5eead0f3682a332bf34d1 (patch) | |
tree | 32f66459f13c3c5ac8dde5b5d1dba28eaecf71c9 /platform/ios/app | |
parent | f936295b76df6f998f8bf9508e7f370fe92cd0cf (diff) | |
download | qtlocation-mapboxgl-52abcb5a735471dc4bf5eead0f3682a332bf34d1.tar.gz |
[ios] Animate user dot between user location updates
Use UIView animation to explicitly animate the user dot between user location updates. There is a tricky special case, which is that the callout must point to the annotation view’s implicit frame but must quickly rendezvous with the explicit frame.
Fixes #1041.
Diffstat (limited to 'platform/ios/app')
-rw-r--r-- | platform/ios/app/MBXCustomCalloutView.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/ios/app/MBXCustomCalloutView.m b/platform/ios/app/MBXCustomCalloutView.m index 8f9bd8ed40..11ce86e76a 100644 --- a/platform/ios/app/MBXCustomCalloutView.m +++ b/platform/ios/app/MBXCustomCalloutView.m @@ -40,6 +40,11 @@ static CGFloat const tipWidth = 10.0; - (void)presentCalloutFromRect:(CGRect)rect inView:(UIView *)view constrainedToView:(UIView *)constrainedView animated:(BOOL)animated { + if ([self.delegate respondsToSelector:@selector(calloutViewWillAppear:)]) + { + [self.delegate performSelector:@selector(calloutViewWillAppear:) withObject:self]; + } + [view addSubview:self]; // prepare title label if ([self.representedObject respondsToSelector:@selector(title)]) |