- Present stats page always on main thread ios-develop
authorantonc27 <antonc27@mail.ru>
Sat, 30 Dec 2017 01:31:27 +0100
branchios-develop
changeset 12878 f012ce693681
parent 12877 00215a7ec5f5
child 13169 eefd6d066768
- Present stats page always on main thread
project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m
--- a/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sat Dec 30 01:22:11 2017 +0100
+++ b/project_files/HedgewarsMobile/Classes/GameInterfaceBridge.m	Sat Dec 30 01:31:27 2017 +0100
@@ -183,6 +183,10 @@
 #pragma mark -
 #pragma mark EngineProtocolDelegate methods
 - (void)gameEndedWithStatistics:(NSArray *)stats {
+    [self performSelectorOnMainThread:@selector(presentStats:) withObject:stats waitUntilDone:NO];
+}
+
+- (void)presentStats:(NSArray *)stats {
     if (stats != nil) {
         StatsPageViewController *statsPage = [[StatsPageViewController alloc] init];
         statsPage.statsArray = stats;