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

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

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -