Although I can’t let the notification work, however, I resolve this by put reloadManagers() into saveToPreferencesWithCompletionHandler closure. It works well now.
— Kevin > Kevin Yu <[email protected]> 於 2016年5月27日 上午9:49 寫道: > > >> [email protected] >> <mailto:[email protected]> 於 2016年5月27日 上午3:00 寫道: >> >> On 26 May 2016, at 02:26, Kevin Yu <[email protected] >> <mailto:[email protected]>> wrote: >> >>> I was wondering if there’s a way to know what’s the user’s choice? via some >>> kind of KVO mechanism? >> >> Do you not see NEVPNConfigurationChangeNotification posted in this case? > > No, the notification seems not work, I wrote this way: > > override func viewDidLoad() { > … > NSNotificationCenter.defaultCenter().addObserver(self, > selector: #selector(configurationChanged), name: > NEVPNConfigurationChangeNotification, object: nil) > … > } > > func configurationChanged() { > reloadManagers() > } > > > anything wrong in the above code? > > — Kevin >
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/macnetworkprog/archive%40mail-archive.com This email sent to [email protected]
