- Present stats page always on main thread ios-develop
authorantonc27 <antonc27@mail.ru>
Sat, 30 Dec 2017 01:31:27 +0100
branchios-develop
changeset 12873 f012ce693681
parent 12872 00215a7ec5f5
child 13164 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;