[英]How to reload a UIViewcontroller from background process in iphone?
目前,我正在使用簡單的iPhone應用程序,獲取當前設備區域以顯示在文本字段中,當我更改區域應用程序的運行時間時,按主屏幕按鈕應用程序進入后台進程,然后我選擇任意區域,然后再次從后台打開應用程序該區域不能在該文本字段中更改,但導航到另一個屏幕然后進入上一屏幕,該區域已更改,但是我不希望導航到任何其他屏幕,該區域會自動更改,因此如何重新加載UIViewController
,請任何一個幫助我。
提前致謝
-(void)viewDidLoad
{
NSDecimalNumber *amountt = [NSDecimalNumber decimalNumberWithString:@"10.00"];
NSNumberFormatter *currencyFormatt = [[NSNumberFormatter alloc] init];
NSLocale *locale = [NSLocale currentLocale];
[currencyFormatt setNumberStyle:NSNumberFormatterCurrencyStyle];
[currencyFormatt setLocale:locale];
NSString *symboll = [NSString stringWithFormat:@"%@",[currencyFormatt stringFromNumber:amountt]];
NSString *getsymbol = [symboll stringByReplacingOccurrencesOfString:@"10.00" withString:@""];
NSString *Getdollarsymbol = [getsymbol stringByReplacingOccurrencesOfString:@"10,00" withString:@""];
NSLog(@"Getdollarsymbol:%@",Getdollarsymbol);
}
您需要調查您的應用程序委托。 您可以調用UIViewController從那里進行更新。
- (void)applicationDidBecomeActive:(UIApplication *)application
您可能還想聽有關的通知
UIApplicationDidBecomeActiveNotification
通過NSNotificationCenter,如果您的應用再次激活,則將觸發此通知。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.