我一直在尝试将 UIActivityIndicatorView 添加到基于 google map sdk 的视图中,该视图将在引脚加载时进行动画处理。地图加载,图钉掉落,但活动指示器被屏蔽、隐藏或不包括在内。使用基于 iOS 的地图实现,我已经成功地实现了同样的行为,但如果可能的话,我更愿意在谷歌地图中执行此操作。这可能与线程行为有关吗?
谢谢,水
//view's .h
//this was created from dragging from the view to the .h file
@property (weak, nonatomic) IBOutlet UIActivityIndicatorView *activityIndicator;
//view's .m
@synthesize activityIndicator;
...
//viewDidLoad calls a function that kicks off the animation
self.view = mapView;
[self.mapView setDelegate:self];
[self.activityIndicator startAnimating];
//later after the final pin is dropped the following is called
[self.activityIndicator stopAnimating];