当前位置: 代码迷 >> Iphone >> iphone program received signal:"SIGABRT"该怎么处理
  详细解决方案

iphone program received signal:"SIGABRT"该怎么处理

热度:435   发布时间:2016-04-25 06:09:03.0
iphone program received signal:"SIGABRT"

UITabBarController *tabBarController =  
    (UITabBarController *)self.window.rootViewController;  
    UINavigationController *navigationController =  
    [[tabBarController viewControllers] objectAtIndex:0];  
    PlayerViewController *playerViewController =  
    [[navigationController viewControllers] objectAtIndex:0];
    playerViewController.players = players;  
    return YES;



用的Stroryboard
TabBar->Nav(包含TableView)

照着示例写的,可是运行报错。
报错:iphone program received signal:"SIGABRT"
位置:
PlayerViewController *playerViewController =  
    [[navigationController viewControllers] objectAtIndex:0];
------解决方案--------------------
看下[navigationController viewControllers] 返回的NSArray 中的object数量是不是0 或者是nil
  相关解决方案