2012-07-19 40 views
0

目前我正在简单的iphone应用程序,获取当前设备区域显示在一个文本框,当我改变区域应用程序运行时间,按主页按钮应用程序去后台进程,然后我选择任何区域,再次打开应用程序从背景该地区不能更改该文本字段,但导航另一个屏幕,然后来到前一个屏幕的区域更改,但我不想导航到任何其他屏幕,区域自动更改,所以如何重新加载UIViewController,请任何人帮助我。如何在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); 

} 

回答

0

你需要考虑你的应用程序代理。你可以打电话给你的UIViewController从那里更新自己。

- (void)applicationDidBecomeActive:(UIApplication *)application 
0

您可能还需要监听的通知上

UIApplicationDidBecomeActiveNotification 

经由NSNotificationCenter,该通知将被解雇,如果你的应用程序已经变得活跃起来。

+0

有一个关于Notifications和NSMutableDictionary的笑话就是你需要编写一个应用程序。总的来说,这不是做生意的好方法。 – 2012-07-19 15:22:38

相关问题