から来たときにボタンのラベル名「ヌル」を取得ボタンを押し、マイアプリのバックグラウンドのデリゲートメソッド
は、私は、このメソッドを使用するようにする場合Backgrounでタイマーを実行したいとき、私はタイマーを実行し、
Startbtnpress方法、 -(IBAction)Startbtnpress
{
NSLog(@"start.titleLabe:%@",start.titleLabel.text);
if([start.titleLabel.text isEqualToString:@"START"])
{
myticker = [NSTimer scheduledTimerWithTimeInterval:(1.0) target:self selector:@selector(ShowActicity) userInfo:nil repeats:YES];
}
else if([start.titleLabel.text isEqualToString:@"STOP"]
{
[myticker invalidate];
}
}
以内
- (void)applicationWillEnterForeground:(UIApplication *)application
{
FirstViewController *view = [[FirstViewController alloc]init];
[view Startbtnpress]; //call the startbtnmethod
}
初めてのNSLogでスタートボタンメソッド呼び出し(@ "start.titleLabe:%の@"、start.titleLabel.text)。私はのNSLogで
- (void)applicationWillEnterForeground:(UIApplication *)application
て来たとき は、私が "START"
を取得(@ "start.titleLabe:%の@"、start.titleLabel.text)。 Null値が表示されますか?
何が間違っている可能性がありますか?
リリースしたオブジェクト。 –