Note that there are some explanatory texts on larger screens.

plurals
  1. POGetting crash in ios7 _UINavigationBarBackIndicatorView
    text
    copied!<p>The code below is working fine in ios6 but getting crashed in ios7. What is the reason i am not getting. Below posting the code and the error message i am getting.</p> <pre><code>-(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]; } </code></pre> <p><strong>Error:</strong> </p> <blockquote> <p>[_UINavigationBarBackIndicatorView setAlpha:]: message sent to deallocated instance 0x10e43760</p> </blockquote> <p>update : found crash.</p> <pre><code>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]; } </code></pre> <p>It is crashing here [tabBar setSelectedIndex:2];</p> <p>Thanks in advance.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload