2012年11月6日火曜日

nested push animation can result in corrupted navigation bar


nested push animation can result in corrupted navigation bar

Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.

Unbalanced calls to begin/end appearance transitions for .

このエラーに引っかかった。 まぁそのままんまですが、解決するまですごく時間かかった。 こいつとかみたらいんですかねー。 で、どんな感じで書いてたかと

//ボタンを押したときの処理
- (IBAction)btnact:(id)sender {
     //seguのIDを設定 (送り先のViewに値を渡すため・・・)
    [self performSegueWithIdentifier:@"ponSegue" sender:self];
}

//seguの処理
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // 遷移先を取得
    if ([[segue identifier] isEqualToString:@"ponSegue"]) {
    }    
}

こういう感じです。違和感なかったです(汗)もちろん、storyboardの方も設定してますよ。 解決方法はというと、

//ボタンを押したときの処理
- (IBAction)btnact:(id)sender {

// ここいらない
}

//seguの処理
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // 遷移先を取得
    if ([[segue identifier] isEqualToString:@"ponSegue"]) {
    }    
}

以上でーす。 おそらくボタンからの画面遷移をstoryboardで設定してたからでしょうね(伝わってる??)

0 件のコメント:

コメントを投稿