2015-10-27 98 views

回答

1

您可以为UIApplicationDidFinishLaunchingNotification添加一个观察者您的视图控制器viewDidLoad方法中:

NSNotificationCenter.defaultCenter().addObserver(self, selector: "yourMethod:", name: UIApplicationDidFinishLaunchingNotification, object: nil) 

添加您的方法视图控制器

func yourMethod(notification: NSNotification?) { 
    // your code 
} 
+1

该死的完美。我不相信我在研究中没有发现这一点。谢谢老板! – justColbs

+0

@justColbs不用客气 –

相关问题