Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/38.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 在ios7中获取崩溃信息_Iphone_Objective C_Ios7_Uinavigationbar - Fatal编程技术网

Iphone 在ios7中获取崩溃信息

Iphone 在ios7中获取崩溃信息,iphone,objective-c,ios7,uinavigationbar,Iphone,Objective C,Ios7,Uinavigationbar,下面的代码在ios6中运行良好,但在ios7中崩溃。我不明白的原因是什么。下面是我收到的代码和错误信息 -(void)viewWillAppear:(BOOL)animated { [NSThread detachNewThreadSelector:@selector(showLoading) toTarget:self withObject:nil]; if ([[NSUserDefaults standardUserDefaults] boolForKey:@"isBannerSho

下面的代码在ios6中运行良好,但在ios7中崩溃。我不明白的原因是什么。下面是我收到的代码和错误信息

-(void)viewWillAppear:(BOOL)animated
{   
[NSThread detachNewThreadSelector:@selector(showLoading) toTarget:self withObject:nil];

if ([[NSUserDefaults standardUserDefaults] boolForKey:@"isBannerShown"]) //-ive logic is applied 
{
    [self.adBannerView setHidden:YES];
    [self.adBannerView setDelegate:nil];
}

if([Manager getInt]==3)
{   
    Animation *objAnimation = [[Animation alloc]init];
    self.hidesBottomBarWhenPushed = YES;
    [self.navigationController pushViewController:objAnimation animated:NO];
}

[self.navigationController.navigationBar setHidden:NO];
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"setting.png"] forBarMetrics:UIBarMetricsDefault];

btnRefresh = [UIButton buttonWithType:UIButtonTypeCustom];
[btnRefresh setFrame:CGRectMake(280,9,33,31)];
[btnRefresh setBackgroundImage:[UIImage imageNamed:@"refresh.png"] forState:UIControlStateNormal];
[btnRefresh addTarget:self action:@selector(btnRefreshPressed) forControlEvents:UIControlEventTouchUpInside];
barButtonRefresh = [[UIBarButtonItem alloc] initWithCustomView:btnRefresh];
self.navigationItem.rightBarButtonItem = barButtonRefresh;

[self createTable];
if(viewMessage)
{
    [viewMessage removeFromSuperview];
}

viewMessage= [[UIView alloc]initWithFrame:CGRectMake(6,8,307,screenSize.height - 110)];
[viewMessage setBackgroundColor:[UIColor blackColor]];
[viewMessage setAlpha:.7];
[contentView addSubview:viewMessage];

[self createView];
[viewMessage setHidden:YES];
[contentView bringSubviewToFront:adBannerView];

float width = [Manager getImageWidth] ;
float height = [Manager getImageHeight];
count =0;

if(imgViewFullImage)
{
    [imgViewFullImage removeFromSuperview];
}
imgViewFullImage = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,width,height)];
[imgViewFullImage setBackgroundColor:[UIColor blackColor]];
[imgViewFullImage setContentMode:UIViewContentModeScaleToFill];
[self.view addSubview:imgViewFullImage];
[imgViewFullImage setHidden:YES];

UIImageView *imgHeader = [[UIImageView alloc]initWithFrame:CGRectMake(0,0,320,44)];
[imgHeader setImage:[UIImage imageNamed:@"connect-req1.png"]];
[self.navigationController.navigationBar addSubview:imgHeader];

UILabel *lblHeader  = [[UILabel alloc]initWithFrame:CGRectMake(80,8,200,30)];
[lblHeader setBackgroundColor:[UIColor clearColor]];
[lblHeader setTextAlignment:UITextAlignmentLeft];
[lblHeader setTextColor:[UIColor whiteColor]];
[lblHeader setFont:[UIFont boldSystemFontOfSize:19.0]];
[lblHeader setText:@"Connect Requests"];
[self.navigationController.navigationBar addSubview:lblHeader];

 btnRefresh = [UIButton buttonWithType:UIButtonTypeCustom];
[btnRefresh setFrame:CGRectMake(280,9,33,31)];
[btnRefresh setBackgroundImage:[UIImage imageNamed:@"refresh.png"] forState:UIControlStateNormal];
[btnRefresh addTarget:self action:@selector(btnRefreshPressed) forControlEvents:UIControlEventTouchUpInside];
[self.navigationController.navigationBar addSubview:btnRefresh];

[self createTable];
if(viewMessage)
{
    [viewMessage removeFromSuperview];
}

viewMessage= [[UIView alloc]initWithFrame:CGRectMake(6,8,307,screenSize.height - 110)];
[viewMessage setBackgroundColor:[UIColor blackColor]];
[viewMessage setAlpha:.7];
[contentView addSubview:viewMessage];

[self createView];
[viewMessage setHidden:YES];
[contentView bringSubviewToFront:adBannerView];

}
错误:

[\u UINAVIGATIONBACKINDICATORVIEW setAlpha:]:消息发送至 解除分配的实例0x10e43760

更新:发现崩溃

case 4:
    {
        btnMoreSelected=NO;
        [Manager setInt:1];
        [tabBar setSelectedIndex:2];
        [imgMore setImage:[UIImage imageNamed:@"more.png"]];
        [imgMyConnection setImage:[UIImage imageNamed:@"connect-req-hover.png"]];
        [imgIceBreaker setImage:[UIImage imageNamed:@"my-ice-brkr.png"]];
        [imgSetting setImage:[UIImage imageNamed:@"settings-nav.png"]];
        [imgSearchView setImage:[UIImage imageNamed:@"search.png"]];
        [imgSearchSeparator setHidden:NO];
        [imgSettingSeprator setHidden:NO];
        [imgIceBreakerSeparator setHidden:YES];
        [imgMyConnectionSeprator setHidden:YES];

    }
它在这里崩溃了[tabBar setSelectedIndex:2]


提前感谢。

为什么要查看邮件两次,否则您会在同一行代码中发布两次。除去或改变任何人。我还没有编辑这篇文章。@iDev应用程序在这里杀死当控制器第二次来到这里。当我第二次访问此视图控制器时,我正在使用“选项卡栏控制器”在选项卡之间切换。请阅读“清除我的第二条注释”我这样做了,但仍然是相同的问题。@iDev请查看我的更新。我找到了真正的坠机事件。你能在那方面指导一下吗。