summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadia Barbosa <nadiabarbosa@me.com>2019-03-29 16:20:24 -0700
committerNadia Barbosa <nadiabarbosa@me.com>2019-03-29 16:20:24 -0700
commitef65313d2d5767e891decd30f70f4adde403737e (patch)
tree5b8f58197e107e50a125ebc393f1acbb613c6b19
parent8a688c1d2617ecfc2f8ea3e5fc6ce1eced35b48c (diff)
downloadqtlocation-mapboxgl-upstream/nbsa-12.2-repro-with-work-around.tar.gz
-rw-r--r--platform/ios/app/MBXTabBarViewController.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/platform/ios/app/MBXTabBarViewController.m b/platform/ios/app/MBXTabBarViewController.m
index cfd3571a2b..f8173b9068 100644
--- a/platform/ios/app/MBXTabBarViewController.m
+++ b/platform/ios/app/MBXTabBarViewController.m
@@ -11,9 +11,11 @@
- (void)viewDidLoad {
[super viewDidLoad];
- _repeatingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 repeats:YES block:^(NSTimer * _Nonnull timer) {
- self.selectedIndex = self.selectedIndex == 1 ? 0 : 1;
- }];
+ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC), dispatch_get_main_queue(), ^{
+ self->_repeatingTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 repeats:YES block:^(NSTimer * _Nonnull timer) {
+ self.selectedIndex = self.selectedIndex == 1 ? 0 : 1;
+ }];
+ });
}
@end