0

現在、私は単純な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);

}
4

2 に答える 2

0

アプリデリゲートを調べる必要があります。UIViewControllerを呼び出して、そこから自分自身を更新できます。

- (void)applicationDidBecomeActive:(UIApplication *)application
于 2012-07-19T14:35:32.237 に答える
0

で通知を聞くこともできます

UIApplicationDidBecomeActiveNotification

NSNotificationCenter を介して、アプリが再びアクティブになった場合に、この通知が発生します。

于 2012-07-19T14:37:41.910 に答える