summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h2
-rw-r--r--ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm21
2 files changed, 19 insertions, 4 deletions
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h
index 3b33bc9d75f6..7f4b724b94f8 100644
--- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h
+++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.h
@@ -12,4 +12,6 @@
@property (strong, nonatomic) UIWindow *window;
+- (void) threadMainMethod: (id) argument;
+
@end
diff --git a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
index bf0c67a429df..bb95e5e5afe4 100644
--- a/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
+++ b/ios/experimental/Viewer/Viewer/LOViewerAppDelegate.mm
@@ -23,17 +23,30 @@
(void) launchOptions;
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- // Override point for customization after application launch.
+
self.window.backgroundColor = [UIColor whiteColor];
- lo_initialize();
+ [self.window makeKeyAndVisible];
- // Do something here
+ NSThread* thread = [[NSThread alloc] initWithTarget:self
+ selector:@selector(threadMainMethod:)
+ object:nil];
+ [thread start];
- [self.window makeKeyAndVisible];
return YES;
}
+- (void)threadMainMethod:(id)argument
+{
+ (void) argument;
+
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ lo_initialize();
+
+ [pool release];
+}
+
- (void)applicationWillResignActive:(UIApplication *)application
{
(void) application;