[IOS问题]nested push animation can result in corrupted navigation bar

    1、运行环境

          Macbook Pro  OS X10.9

          Xcode5.1 

    2、遇到的问题

          

        2014-04-16 14:39:34.515 xmpp-test[6257:60b] nested push animation can result in corrupted navigation bar

        2014-04-16 14:39:34.893 xmpp-test[6257:60b] Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted.


     3、在网上也找了一些答案,但是均没有解决问题,最后我自己发现

       采用storyboard中的跳转方式,写了如下代码

      

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath

{

    chatUserName = [onlineUsersobjectAtIndex:indexPath.row];

    

    [selfperformSegueWithIdentifier:@"chat"sender:self];

}


- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender

{

    if ([segue.identifierisEqualToString:@"chat"]) {

        FPChatViewController *chatController = segue.destinationViewController;

        [chatController setChatWithUser:chatUserName];

    }

}


当我去掉 [self performSegueWithIdentifier:@"chat" sender:self];这一行代码时,就没有问题了,网上有答案说采取, [self。navigationController performSegueWithIdentifier:@"chat" sender:self];可以解决问题,但是我尝试后,没有成功。

你可能感兴趣的:(ios)