mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-20 16:35:38 +08:00
run specs upon UIApplicationDidBecomeActiveNotification
This commit is contained in:
@@ -130,16 +130,11 @@ EOS
|
||||
+ (id)launcher
|
||||
{
|
||||
SpecLauncher *launcher = [[self alloc] init];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:launcher selector:@selector(appLaunched:) name:UIApplicationDidFinishLaunchingNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:launcher selector:@selector(appLaunched:) name:UIApplicationDidBecomeActiveNotification object:nil];
|
||||
return launcher;
|
||||
}
|
||||
|
||||
- (void)appLaunched:(id)notification
|
||||
{
|
||||
[self performSelector:@selector(runSpecs) withObject:nil afterDelay:0.1];
|
||||
}
|
||||
|
||||
- (void)runSpecs
|
||||
{
|
||||
EOS
|
||||
spec_objs.each do |_, init_func|
|
||||
|
||||
Reference in New Issue
Block a user