iphone - How do you register for UIApplicationWillEnterForegroundNotification in MonoTouch -
i have problem viewwillappear method uiview not fire when application returns background. problem, main application screen showing values retrieved user settings, , if user has changed these while application in background need have screen refreshed. have read 1 should register uiapplicationwillenterforegroundnotification using nsnotificationcenter.
how do in monotouch? or know alternate way of ensuring screen kept date, when returning background?
you try along lines of:
//register notification somewhere in app nsnotificationcenter.defaultcenter.addobserver(uiapplication.willenterforegroundnotification, enteredforeground); //snip void enteredforeground (nsnotification notification) { // stuff here }
bear in mind need every view controller you'd update when enterting background!
Comments
Post a Comment