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

Popular posts from this blog

css - Text drops down with smaller window -

php - Boolean search on database with 5 million rows, very slow -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -