2013-12-04 5 views
0

У меня есть 2 контрольных монитора. Один из них содержит кнопку, из которой я отправляю запрос на сервер, а в другом представлении - я показываю данные в виде таблицы. Теперь мое приложение разбилось иногда не каждый раз, когда он выполняет метод tableview. Я разбился по методу CFRetain. Вот мой журнал.Crashing Application

Вот мой код Tableview:

#import "SearchResultViewController.h" 
#import "UIImageView+AFNetworking.h" 
#import "SearchResultCell.h" 

@interface SearchResultViewController() 

@end 

@implementation SearchResultViewController 

- (id)initWithStyle:(UITableViewStyle)style { 
self = [super initWithStyle:style]; 
if (self) { 
    // Custom initialization 
} 
return self; 
} 

- (void)viewDidLoad { 
[super viewDidLoad]; 
UIBarButtonItem *btnHelp = [[UIBarButtonItem alloc] initWithTitle:@"Help" style:UIBarButtonItemStylePlain target:self action:@selector(btnHelpAction:)]; 
self.navigationItem.rightBarButtonItem=btnHelp; 
self.title = @"Search Result"; 
} 


-(IBAction)btnHelpAction:(id)sender{ 
HelpViewController *HVC=[[HelpViewController alloc]init]; 
UINavigationController *helpNavController=[[UINavigationController alloc]initWithRootViewController:HVC]; 
[self presentViewController:helpNavController animated:YES completion:nil];} 

- (void)setTitle:(NSString *)title { 
// [super setTitle:title]; 
UILabel *titleView = (UILabel *)self.navigationItem.titleView; 
if (!titleView) { 
    titleView = [[UILabel alloc] initWithFrame:CGRectZero]; 
    titleView.backgroundColor = [UIColor clearColor]; 
    titleView.font = [UIFont fontWithName:GZFont size:16.0]; 
    titleView.textColor = [UIColor colorWithRed:241/255.0 green:90/255.0 blue:41/255.0 alpha:1.0]; 
    self.navigationItem.titleView = titleView; 
} 
titleView.text = title; 
[titleView sizeToFit]; 
    } 


    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 
return [MyAppDelegate.searchResultArray count]; 
// return 1; 
} 
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 
return 1; //changes 
} 
- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 
return 100; 
    } 
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 

SearchResultCell *cell = [tableView dequeueReusableCellWithIdentifier:@"SearchResultCell"]; 
NSArray *tempSearchArray=[MyAppDelegate.searchResultArray objectAtIndex:indexPath.section]; 
if (cell == nil) { 
    NSArray *topLevelObject; 
    topLevelObject = [[NSBundle mainBundle] loadNibNamed:@"SearchResultCell" owner:self options:nil]; 
    cell = [topLevelObject objectAtIndex:0]; 
} 
NSLog(@"%@",[tempSearchArray objectAtIndex:0]); 
cell.lblUsername.text = [tempSearchArray objectAtIndex:0]; 
cell.lblNumber.text = [NSString stringWithFormat:@"%@",[tempSearchArray objectAtIndex:1]]; 
if([tempSearchArray objectAtIndex:2]==[NSNull null]) 
{ 
    NSLog(@"nullll"); 
    [email protected]""; 
} 
else{ 
    cell.lblFirst_name.text = [tempSearchArray objectAtIndex:2]; 
} 
cell.lblLast_name.text = [tempSearchArray objectAtIndex:3]; 

cell.lblEstablishment.text = @"E1123522"; 

if ([[[NSUserDefaults standardUserDefaults] valueForKey:@"UserLogedInType"] intValue] == LoginTypeFacebook) { 
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"FBUserLogedInProfileData"] != [NSNull null]) { 
     NSMutableDictionary *FBUserProfileData = [[NSMutableDictionary alloc] initWithDictionary:[[NSUserDefaults standardUserDefaults] objectForKey:@"FBUserLogedInProfileData"]]; 
     [cell.imgIcon setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://graph.facebook.com/%@/picture?width=100&height=100",[FBUserProfileData objectForKey:@"id"]]] 
        placeholderImage:[UIImage imageNamed:@"icon.png"]]; 
    } 
} 
else { 
    if([[tempSearchArray objectAtIndex:6] boolValue]==1){ 
     ASIFormDataRequest *_requestImage = [[ASIFormDataRequest alloc] initWithURL:[NSURL URLWithString:URLGetImage]]; 
     __unsafe_unretained ASIFormDataRequest *requestImage = _requestImage; 
     [requestImage setPostValue:[tempSearchArray objectAtIndex:4] forKey:@"user_id"]; 
     [requestImage startAsynchronous]; 
     [requestImage setCompletionBlock:^{ 
      NSLog(@"proimage%@",[requestImage responseData]); 
      cell.imgIcon.image=[UIImage imageWithData:[requestImage responseData] scale:1.0f]; 
     }]; 
    } 
    else{ 
    [cell.imgIcon setImage:[UIImage imageNamed:@"No_image.png"]]; 
    } 
} 

cell.imgIcon.layer.cornerRadius = 3.0; 
cell.imgIcon.layer.masksToBounds = YES; 


DYRateView *rateView = [[DYRateView alloc] initWithFrame:CGRectMake(90, 75, 120, 20) 
            fullStar:[UIImage imageNamed:@"StarFullLarge.png"] 
            emptyStar:[UIImage imageNamed:@"StarEmptyLarge.png"]]; 
rateView.padding = 2; 
rateView.rate =[[tempSearchArray objectAtIndex:5] floatValue]; 
//NSLog(@"rating value%f",[[tempSearchArray objectAtIndex:4] floatValue]); 
rateView.alignment = RateViewAlignmentCenter; 
rateView.editable = YES; 
rateView.delegate = self; 
rateView.editable = NO; 
[cell addSubview:rateView]; 

return cell; 
} 

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 
SearchedProfileViewController *profileVC=[[SearchedProfileViewController alloc]init]; 
profileVC.cellId=indexPath.section; 
NSLog(@"%d",profileVC.cellId); 
[self.navigationController pushViewController:profileVC animated:YES]; 
//[self presentViewController:profileVC animated:YES completion:nil]; 
} 

- (void)rateView:(DYRateView *)rateView changedToNewRate:(NSNumber *)rate { 
// self.rateLabel.text = [NSString stringWithFormat:@"Rate: %d", rate.intValue]; 
} 

- (void)didReceiveMemoryWarning { 
[super didReceiveMemoryWarning]; 
} 

@end 

обновленный журнал аварии:

Objective: {objective 0xda869f0: <1:568> + <1:0.5>*0xd982420.marker{id: 726} + <1:-0.5>*_UIParallaxDimmingView:0x1186bb10.Height{id: 707}} 
    2013-12-05 14:41:01.318 GratZeez[1567:3503] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<NSISEngine: 0xc67f090>{ Rows: 
0xc67fa30.negError{id: 631} == 6 + -1*0xc67d5e0:IB auto generated at build time for view with fixed frame.marker{id: 495} + 1*0xc67fa30.posErrorMarker{id: 630} 
0xc685ce0.posErrorMarker{id: 644} == 132 + 1*0xc68b900:IB auto generated at build time for view with fixed frame.marker{id: 509} + 1*0xc685ce0.negError{id: 645} 
0xc6888b0.posErrorMarker{id: 658} == 106 + 1*0xc68b9c0:IB auto generated at build time for view with fixed frame.marker{id: 517} + 1*0xc6888b0.negError{id: 659} 
0xc6888f0.posErrorMarker{id: 660} == 0 + 1*0xc67b5d0:IB auto generated at build time for view with fixed frame.marker{id: 519} + 1*0xc6888f0.negError{id: 661} 
0xc69ffd0.posErrorMarker{id: 646} == 0 + 1*0xc68b930:IB auto generated at build time for view with fixed frame.marker{id: 511} + 1*0xc69ffd0.negError{id: 647} 
0xc6b3200.posErrorMarker{id: 628} == 90 + 1*0xc67ace0:IB auto generated at build time for view with fixed frame.marker{id: 493} + 1*0xc6b3200.negError{id: 629} 
0xc6b45d0.posErrorMarker{id: 636} == 114 + 1*0xc67d670:IB auto generated at build time for view with fixed frame.marker{id: 501} + 1*0xc6b45d0.negError{id: 637} 
0xc6b4620.posErrorMarker{id: 638} == 0 + 1*0xc67d6a0:IB auto generated at build time for view with fixed frame.marker{id: 503} + 1*0xc6b4620.negError{id: 639} 
0xc6b4dc0.posErrorMarker{id: 664} == 72 + 1*0xc67b660:IB auto generated at build time for view with fixed frame.marker{id: 525} + 1*0xc6b4dc0.negError{id: 665} 
0xc6b4e00.posErrorMarker{id: 667} == 0 + 1*0xc67b690:IB auto generated at build time for view with fixed frame.marker{id: 527} + 1*0xc6b4e00.negError{id: 668} 
0xd9707e0.posErrorMarker{id: 589} == 128 + 1*0xc6b34d0:IB auto generated at build time for view with fixed frame.marker{id: 553} + 1*0xd9707e0.negError{id: 590} 
0xd970820.posErrorMarker{id: 591} == 0 + 1*0xc6b3500:IB auto generated at build time for view with fixed frame.marker{id: 555} + 1*0xd970820.negError{id: 592} 
0xd974070.posErrorMarker{id: 585} == 104 + 1*0xc6b3410:IB auto generated at build time for view with fixed frame.marker{id: 545} + 1*0xd974070.negError{id: 586} 
0xd977ca0.posErrorMarker{id: 632} == 90 + 1*0xc6b3650:IB auto generated at build time for view with fixed frame.marker{id: 569} + 1*0xd977ca0.negError{id: 633} 
0xd977dd0.posErrorMarker{id: 634} == 0 + 1*0xc6b3680:IB auto generated at build time for view with fixed frame.marker{id: 571} + 1*0xd977dd0.negError{id: 635} 
0xd97a6d0.negError{id: 588} == 6 + -1*0xc6b3440:IB auto generated at build time for view with fixed frame.marker{id: 547} + 1*0xd97a6d0.posErrorMarker{id: 587} 
0xd97ac70.posErrorMarker{id: 640} == 72 + 1*0xc6b3710:IB auto generated at build time for view with fixed frame.marker{id: 577} + 1*0xd97ac70.negError{id: 641} 
0xd97acd0.posErrorMarker{id: 642} == 0 + 1*0xc6b3740:IB auto generated at build time for view with fixed frame.marker{id: 579} + 1*0xd97acd0.negError{id: 643} 
0xd97cfb0.posErrorMarker{id: 601} == 200 + 1*0xc6b3590:IB auto generated at build time for view with fixed frame.marker{id: 561} + 1*0xd97cfb0.negError{id: 602} 
0xd97cff0.posErrorMarker{id: 603} == 42 + 1*0xc6b35c0:IB auto generated at build time for view with fixed frame.marker{id: 563} + 1*0xd97cff0.negError{id: 604} 
SearchResultCell:0xc6ade20.Height{id: 652} == 200 + 1*0xd97b820.marker{id: 655} 
SearchResultCell:0xc6ade20.Width{id: 650} == 640 + 2*0xd97b7c0.marker{id: 653} + 1*0xd97bd90.marker{id: 670} 
SearchResultCell:0xc6ade20.minX{id: 649} == 0 + 2*0xd97b790.marker{id: 648} + -1*0xd97b7c0.marker{id: 653} 
SearchResultCell:0xc6ade20.minY{id: 651} == 0 + 2*0xd97b7f0.marker{id: 654} + -0.5*0xd97b820.marker{id: 655} 
SearchResultCell:0xc6b2fd0.Height{id: 617} == 200 + 1*0xc6a6a20.marker{id: 625} 
SearchResultCell:0xc6b2fd0.Width{id: 614} == 640 + 2*0xc672a00.marker{id: 623} + 1*0xd97bd90.marker{id: 670} 
SearchResultCell:0xc6b2fd0.minX{id: 620} == 0 + 2*0xc6a03a0.marker{id: 619} + -1*0xc672a00.marker{id: 623} 
SearchResultCell:0xc6b2fd0.minY{id: 621} == 200 + 2*0xc673060.marker{id: 624} + -0.5*0xc6a6a20.marker{id: 625} 
UIImageView:0xc67faa0.Height{id: 540} == 150 + 1*0xc6b3380:IB auto generated at build time for view with fixed frame.marker{id: 539} 
UIImageView:0xc67faa0.Width{id: 538} == 150 + 1*0xc6b3350:IB auto generated at build time for view with fixed frame.marker{id: 537} 
UIImageView:0xc67faa0.minX{id: 534} == 20 + 1*0xc6b32a0:IB auto generated at build time for view with fixed frame.marker{id: 533} 
UIImageView:0xc67faa0.minY{id: 536} == 24 + 1*0xc6b3320:IB auto generated at build time for view with fixed frame.marker{id: 535} 
UIImageView:0xc696c80.Height{id: 488} == 150 + 1*0xc67ac50:IB auto generated at build time for view with fixed frame.marker{id: 487} 
UIImageView:0xc696c80.Width{id: 486} == 150 + 1*0xc67ac20:IB auto generated at build time for view with fixed frame.marker{id: 485} 
UIImageView:0xc696c80.minX{id: 482} == 20 + 1*0xc699a30:IB auto generated at build time for view with fixed frame.marker{id: 481} 
UIImageView:0xc696c80.minY{id: 484} == 24 + 1*0xc699ab0:IB auto generated at build time for view with fixed frame.marker{id: 483} 
UILabel:0xc6732d0.Height{id: 548} == 42 + 1*0xc6b3440:IB auto generated at build time for view with fixed frame.marker{id: 547} 
UILabel:0xc6732d0.Width{id: 546} == 434 + 1*0xc6b3410:IB auto generated at build time for view with fixed frame.marker{id: 545} 
UILabel:0xc6732d0.minX{id: 542} == 186 + 1*0xc6b33b0:IB auto generated at build time for view with fixed frame.marker{id: 541} 
UILabel:0xc6732d0.minY{id: 544} == 20 + 1*0xc6b33e0:IB auto generated at build time for view with fixed frame.marker{id: 543} 
UILabel:0xc67bf90.Height{id: 564} == 42 + 1*0xc6b35c0:IB auto generated at build time for view with fixed frame.marker{id: 563} 
UILabel:0xc67bf90.Width{id: 562} == 200 + 1*0xc6b3590:IB auto generated at build time for view with fixed frame.marker{id: 561} 
UILabel:0xc67bf90.minX{id: 558} == 420 + 1*0xc6b3530:IB auto generated at build time for view with fixed frame.marker{id: 557} 
UILabel:0xc67bf90.minY{id: 560} == 68 + 1*0xc6b3560:IB auto generated at build time for view with fixed frame.marker{id: 559} 
UILabel:0xc67d490.Height{id: 572} == 42 + 1*0xc6b3680:IB auto generated at build time for view with fixed frame.marker{id: 571} 
UILabel:0xc67d490.Width{id: 570} == 200 + 1*0xc6b3650:IB auto generated at build time for view with fixed frame.marker{id: 569} 
UILabel:0xc67d490.minX{id: 566} == 186 + 1*0xc6b35f0:IB auto generated at build time for view with fixed frame.marker{id: 565} 
UILabel:0xc67d490.minY{id: 568} == 106 + 1*0xc6b3620:IB auto generated at build time for view with fixed frame.marker{id: 567} 
UILabel:0xc67d840.Height{id: 512} == 42 + 1*0xc68b930:IB auto generated at build time for view with fixed frame.marker{id: 511} 
UILabel:0xc67d840.Width{id: 510} == 200 + 1*0xc68b900:IB auto generated at build time for view with fixed frame.marker{id: 509} 
UILabel:0xc67d840.minX{id: 506} == 420 + 1*0xc67d6d0:IB auto generated at build time for view with fixed frame.marker{id: 505} 
UILabel:0xc67d840.minY{id: 508} == 68 + 1*0xc68b8d0:IB auto generated at build time for view with fixed frame.marker{id: 507} 
UILabel:0xc681210.Height{id: 504} == 42 + 1*0xc67d6a0:IB auto generated at build time for view with fixed frame.marker{id: 503} 
UILabel:0xc681210.Width{id: 502} == 200 + 1*0xc67d670:IB auto generated at build time for view with fixed frame.marker{id: 501} 
UILabel:0xc681210.minX{id: 498} == 186 + 1*0xc67d610:IB auto generated at build time for view with fixed frame.marker{id: 497} 
UILabel:0xc681210.minY{id: 500} == 68 + 1*0xc67d640:IB auto generated at build time for view with fixed frame.marker{id: 499} 
UILabel:0xc683e20.Height{id: 520} == 42 + 1*0xc67b5d0:IB auto generated at build time for view with fixed frame.marker{id: 519} 
UILabel:0xc683e20.Width{id: 518} == 200 + 1*0xc68b9c0:IB auto generated at build time for view with fixed frame.marker{id: 517} 
UILabel:0xc683e20.minX{id: 514} == 186 + 1*0xc68b960:IB auto generated at build time for view with fixed frame.marker{id: 513} 
UILabel:0xc683e20.minY{id: 516} == 106 + 1*0xc68b990:IB auto generated at build time for view with fixed frame.marker{id: 515} 
UILabel:0xc685a40.Height{id: 556} == 42 + 1*0xc6b3500:IB auto generated at build time for view with fixed frame.marker{id: 555} 
UILabel:0xc685a40.Width{id: 554} == 200 + 1*0xc6b34d0:IB auto generated at build time for view with fixed frame.marker{id: 553} 
UILabel:0xc685a40.minX{id: 550} == 186 + 1*0xc6b3470:IB auto generated at build time for view with fixed frame.marker{id: 549} 
UILabel:0xc685a40.minY{id: 552} == 68 + 1*0xc6b34a0:IB auto generated at build time for view with fixed frame.marker{id: 551} 
UILabel:0xc686460.Height{id: 580} == 42 + 1*0xc6b3740:IB auto generated at build time for view with fixed frame.marker{id: 579} 
UILabel:0xc686460.Width{id: 578} == 200 + 1*0xc6b3710:IB auto generated at build time for view with fixed frame.marker{id: 577} 
UILabel:0xc686460.minX{id: 574} == 420 + 1*0xc6b36b0:IB auto generated at build time for view with fixed frame.marker{id: 573} 
UILabel:0xc686460.minY{id: 576} == 106 + 1*0xc6b36e0:IB auto generated at build time for view with fixed frame.marker{id: 575} 
UILabel:0xc68a640.Height{id: 528} == 42 + 1*0xc67b690:IB auto generated at build time for view with fixed frame.marker{id: 527} 
UILabel:0xc68a640.Width{id: 526} == 200 + 1*0xc67b660:IB auto generated at build time for view with fixed frame.marker{id: 525} 
UILabel:0xc68a640.minX{id: 522} == 420 + 1*0xc67b600:IB auto generated at build time for view with fixed frame.marker{id: 521} 
UILabel:0xc68a640.minY{id: 524} == 106 + 1*0xc67b630:IB auto generated at build time for view with fixed frame.marker{id: 523} 
UILabel:0xc68c5d0.Height{id: 496} == 42 + 1*0xc67d5e0:IB auto generated at build time for view with fixed frame.marker{id: 495} 
UILabel:0xc68c5d0.Width{id: 494} == 434 + 1*0xc67ace0:IB auto generated at build time for view with fixed frame.marker{id: 493} 
UILabel:0xc68c5d0.minX{id: 490} == 186 + 1*0xc67ac80:IB auto generated at build time for view with fixed frame.marker{id: 489} 
UILabel:0xc68c5d0.minY{id: 492} == 20 + 1*0xc67acb0:IB auto generated at build time for view with fixed frame.marker{id: 491} 
UILayoutContainerView:0xc670770.Height{id: 393} == 1136 + 1*0xc685240:UIView-Encapsulated-Layout-Height.marker{id: 398} 
UILayoutContainerView:0xc670770.Width{id: 390} == 640 + 1*0xc685210:UIView-Encapsulated-Layout-Width.marker{id: 395} 
UINavigationTransitionView:0xc6720e0.Height{id: 389} == 1136 + 2*0xc6844d0.marker{id: 394} + 1*0xc685240:UIView-Encapsulated-Layout-Height.marker{id: 398} 
UINavigationTransitionView:0xc6720e0.Width{id: 387} == 640 + 2*0xc684430.marker{id: 391} + 1*0xc685210:UIView-Encapsulated-Layout-Width.marker{id: 395} 
UINavigationTransitionView:0xc6720e0.minX{id: 386} == 0 + 2*0xc684400.marker{id: 385} + -1*0xc684430.marker{id: 391} 
UINavigationTransitionView:0xc6720e0.minY{id: 388} == 0 + 2*0xc6844a0.marker{id: 392} + -1*0xc6844d0.marker{id: 394} 
UITableView:0x14a40a00.Height{id: 701} == 0 + 1*_UIParallaxDimmingView:0x1186bb10.Height{id: 707} + 2*0xd97c220.marker{id: 710} 
UITableView:0x14a40a00.Width{id: 699} == 640 + 2*0xd97c1c0.marker{id: 703} + 1*0xd9823c0.marker{id: 719} + -2*tempToBeOptimizedToZero{id: 720} 
UITableView:0x14a40a00.contentHeight{id: 480} == 400 + 1*0xc6ad9c0.marker{id: 479} 
UITableView:0x14a40a00.contentWidth{id: 478} == 640 + 1*0xc6ad980.marker{id: 477} 
UITableView:0x14a40a00.minX{id: 698} == 0 + 2*0xd97c190.marker{id: 697} + -1*0xd97c1c0.marker{id: 703} 
UITableView:0x14a40a00.minY{id: 700} == 0 + 2*0xd97c1f0.marker{id: 705} + -1*0xd97c220.marker{id: 710} 
UITableViewCellContentView:0xc67b900.Height{id: 677} == 199 + 1*0xc6b51c0.marker{id: 683} 
UITableViewCellContentView:0xc67b900.Width{id: 675} == 640 + 1*0xc6b5160.marker{id: 678} 
UITableViewCellContentView:0xc67b900.minX{id: 674} == 0 + 2*0xc6b5130.marker{id: 673} + -0.5*0xc6b5160.marker{id: 678} 
UITableViewCellContentView:0xc67b900.minY{id: 676} == 0 + 2*0xc6b5190.marker{id: 681} + -0.5*0xc6b51c0.marker{id: 683} 
UITableViewCellContentView:0xc6a7d10.Height{id: 597} == 199 + 1*0xc6ae810.marker{id: 606} 
UITableViewCellContentView:0xc6a7d10.Width{id: 595} == 640 + 1*0xc6ae700.marker{id: 598} 
UITableViewCellContentView:0xc6a7d10.minX{id: 594} == 0 + 2*0xc6ae660.marker{id: 593} + -0.5*0xc6ae700.marker{id: 598} 
UITableViewCellContentView:0xc6a7d10.minY{id: 596} == 0 + 2*0xc6ae750.marker{id: 605} + -0.5*0xc6ae810.marker{id: 606} 
UITableViewCellScrollView:0xc6aeb60.Height{id: 693} == 200 + 1*0xd97b820.marker{id: 655} + 2*0xc6b5c10.marker{id: 706} 
UITableViewCellScrollView:0xc6aeb60.Width{id: 691} == 640 + 2*0xd97b7c0.marker{id: 653} + 1*0xd97bd90.marker{id: 670} + 2*0xc6b5bb0.marker{id: 694} 
UITableViewCellScrollView:0xc6aeb60.contentHeight{id: 532} == 200 + 1*0xc68c560.marker{id: 531} 
UITableViewCellScrollView:0xc6aeb60.contentWidth{id: 530} == 640 + 1*0xc68c4c0.marker{id: 529} 
UITableViewCellScrollView:0xc6aeb60.minX{id: 690} == 0 + 2*0xc6b5d00.marker{id: 689} + -1*0xc6b5bb0.marker{id: 694} 
UITableViewCellScrollView:0xc6aeb60.minY{id: 692} == 0 + 2*0xc6b5be0.marker{id: 704} + -1*0xc6b5c10.marker{id: 706} 
UITableViewCellScrollView:0xc6b3880.Height{id: 613} == 200 + 2*0xc6b2480.marker{id: 618} + 1*0xc6a6a20.marker{id: 625} 
UITableViewCellScrollView:0xc6b3880.Width{id: 611} == 640 + 2*0xc6b22e0.marker{id: 615} + 2*0xc672a00.marker{id: 623} + 1*0xd97bd90.marker{id: 670} 
UITableViewCellScrollView:0xc6b3880.contentHeight{id: 584} == 200 + 1*0xc6b3ce0.marker{id: 583} 
UITableViewCellScrollView:0xc6b3880.contentWidth{id: 582} == 640 + 1*0xc6b37d0.marker{id: 581} 
UITableViewCellScrollView:0xc6b3880.minX{id: 610} == 0 + 2*0xc6b2220.marker{id: 609} + -1*0xc6b22e0.marker{id: 615} 
UITableViewCellScrollView:0xc6b3880.minY{id: 612} == 0 + 2*0xc6b23b0.marker{id: 616} + -1*0xc6b2480.marker{id: 618} 
UITableViewWrapperView:0x1186b2c0.Height{id: 669} == 1136 + 1*0xd97bdf0.marker{id: 686} 
UITableViewWrapperView:0x1186b2c0.Width{id: 622} == 640 + 1*0xd97bd90.marker{id: 670} 
UITableViewWrapperView:0x1186b2c0.minX{id: 663} == 0 + 2*0xd97bd60.marker{id: 662} + -0.5*0xd97bd90.marker{id: 670} 
UITableViewWrapperView:0x1186b2c0.minY{id: 666} == 0 + 2*0xd97bdc0.marker{id: 682} + -0.5*0xd97bdf0.marker{id: 686} 
UIView:0xc674820.Height{id: 453} == 1136 + 1*0xc679f40.marker{id: 474} 
UIView:0xc674820.Width{id: 451} == 640 + 1*0xc69ff70.marker{id: 470} 
UIView:0xc674820.minX{id: 450} == -192 + 2*0xc69ff40.marker{id: 469} + -0.5*0xc69ff70.marker{id: 470} 
UIView:0xc674820.minY{id: 452} == 0 + 2*0xc69ffa0.marker{id: 473} + -0.5*0xc679f40.marker{id: 474} 
UIView:0xc6752d0.Height{id: 718} == 1136 + 1*0xd982620.marker{id: 730} 
UIView:0xc6752d0.Width{id: 716} == 640 + 1*0xd9825c0.marker{id: 722} 
UIView:0xc6752d0.minX{id: 715} == 0 + 2*0xd982580.marker{id: 714} + -0.5*0xd9825c0.marker{id: 722} 
UIView:0xc6752d0.minY{id: 717} == 0 + 2*0xd9825f0.marker{id: 729} + -0.5*0xd982620.marker{id: 730} 
UIViewControllerWrapperView:0xc687700.Height{id: 377} == 1136 + 1*0xc683fa0.marker{id: 382} 
UIViewControllerWrapperView:0xc687700.Width{id: 375} == 640 + 1*0xc683f00.marker{id: 378} 
UIViewControllerWrapperView:0xc687700.minX{id: 374} == 0 + 2*0xc683ed0.marker{id: 373} + -0.5*0xc683f00.marker{id: 378} 
UIViewControllerWrapperView:0xc687700.minY{id: 376} == 0 + 2*0xc683f70.marker{id: 381} + -0.5*0xc683fa0.marker{id: 382} 
_UIParallaxDimmingView:0x1186bb10.Width{id: 702} == 640 + 1*0xd9823c0.marker{id: 719} 
_UIParallaxDimmingView:0x1186bb10.minX{id: 712} == 0 + 2*0xd982390.marker{id: 711} + -0.5*0xd9823c0.marker{id: 719} + 1*tempToBeOptimizedToZero{id: 720} 
_UIParallaxDimmingView:0x1186bb10.minY{id: 713} == 568 + -0.5*_UIParallaxDimmingView:0x1186bb10.Height{id: 707} + 2*0xd9823f0.marker{id: 725} 
objective{id: 243} == {objective 0xc67e090: <750:12, 251:1150> + <251:1>*0xc67ace0:IB auto generated at build time for view with fixed frame.marker{id: 493} + <251:1>*0xc67b5d0:IB auto generated at build time for view with fixed frame.marker{id: 519} + <251:1>*0xc67b660:IB auto generated at build time for view with fixed frame.marker{id: 525} + <251:1>*0xc67b690:IB auto generated at build time for view with fixed frame.marker{id: 527} + <750:-1>*0xc67d5e0:IB auto generated at build time for view with fixed frame.marker{id: 495} + <251:1>*0xc67d670:IB auto generated at build time for view with fixed frame.marker{id: 501} + <251:1>*0xc67d6a0:IB auto generated at build time for view with fixed frame.marker{id: 503} + <750:1, 251:1>*0xc67fa30.posErrorMarker{id: 630} + <750:1, 251:1>*0xc685ce0.negError{id: 645} + <750:1, 251:1>*0xc6888b0.negError{id: 659} + <750:1, 251:1>*0xc6888f0.negError{id: 661} + <251:1>*0xc68b900:IB auto generated at build time for view with fixed frame.marker{id: 509} + <251:1>*0xc68b930:IB auto generated at build time for view with fixed frame.marker{id: 511} + <251:1>*0xc68b9c0:IB auto generated at build time for view with fixed frame.marker{id: 517} + <750:1, 251:1>*0xc69ffd0.negError{id: 647} + <750:1, 251:1>*0xc6b3200.negError{id: 629} + <251:1>*0xc6b3410:IB auto generated at build time for view with fixed frame.marker{id: 545} + <750:-1>*0xc6b3440:IB auto generated at build time for view with fixed frame.marker{id: 547} + <251:1>*0xc6b34d0:IB auto generated at build time for view with fixed frame.marker{id: 553} + <251:1>*0xc6b3500:IB auto generated at build time for view with fixed frame.marker{id: 555} + <251:1>*0xc6b3590:IB auto generated at build time for view with fixed frame.marker{id: 561} + <251:1>*0xc6b35c0:IB auto generated at build time for view with fixed frame.marker{id: 563} + <251:1>*0xc6b3650:IB auto generated at build time for view with fixed frame.marker{id: 569} + <251:1>*0xc6b3680:IB auto generated at build time for view with fixed frame.marker{id: 571} + <251:1>*0xc6b3710:IB auto generated at build time for view with fixed frame.marker{id: 577} + <251:1>*0xc6b3740:IB auto generated at build time for view with fixed frame.marker{id: 579} + <750:1, 251:1>*0xc6b45d0.negError{id: 637} + <750:1, 251:1>*0xc6b4620.negError{id: 639} + <750:1, 251:1>*0xc6b4dc0.negError{id: 665} + <750:1, 251:1>*0xc6b4e00.negError{id: 668} + <750:1, 251:1>*0xd9707e0.negError{id: 590} + <750:1, 251:1>*0xd970820.negError{id: 592} + <750:1, 251:1>*0xd974070.negError{id: 586} + <750:1, 251:1>*0xd977ca0.negError{id: 633} + <750:1, 251:1>*0xd977dd0.negError{id: 635} + <750:1, 251:1>*0xd97a6d0.posErrorMarker{id: 587} + <750:1, 251:1>*0xd97ac70.negError{id: 641} + <750:1, 251:1>*0xd97acd0.negError{id: 643} + <750:1, 251:1>*0xd97cfb0.negError{id: 602} + <750:1, 251:1>*0xd97cff0.negError{id: 604}} 
tempToBeOptimizedToZeroObjective{id: 728} == {objective 0xda869f0: <1:568> + <1:0.5>*0xd982420.marker{id: 726} + <1:-0.5>*_UIParallaxDimmingView:0x1186bb10.Height{id: 707}} 
tempToBeOptimizedToZero{id: 727} == 568 + -0.5*_UIParallaxDimmingView:0x1186bb10.Height{id: 707} + 0.5*0xd982420.marker{id: 726} 
 Constraints: 
<NSAutoresizingMaskLayoutConstraint:0xc672a00 h=-&- v=--& SearchResultCell:0xc6b2fd0.width == UITableViewWrapperView:0x1186b2c0.width>  Marker:0xc672a00.marker{id: 623} 
<NSAutoresizingMaskLayoutConstraint:0xc673060 h=-&- v=--& SearchResultCell:0xc6b2fd0.midY == + 150>  Marker:0xc673060.marker{id: 624} 
<NSAutoresizingMaskLayoutConstraint:0xc679f40 h=--& v=--& V:[UIView:0xc674820(568)]>  Marker:0xc679f40.marker{id: 474} 
<NSAutoresizingMaskLayoutConstraint:0xc683ed0 h=--& v=--& UIViewControllerWrapperView:0xc687700.midX == + 160>  Marker:0xc683ed0.marker{id: 373} 
<NSAutoresizingMaskLayoutConstraint:0xc683f00 h=--& v=--& H:[UIViewControllerWrapperView:0xc687700(320)]>  Marker:0xc683f00.marker{id: 378} 
<NSAutoresizingMaskLayoutConstraint:0xc683f70 h=--& v=--& UIViewControllerWrapperView:0xc687700.midY == + 284>  Marker:0xc683f70.marker{id: 381} 
<NSAutoresizingMaskLayoutConstraint:0xc683fa0 h=--& v=--& V:[UIViewControllerWrapperView:0xc687700(568)]>  Marker:0xc683fa0.marker{id: 382} 
<NSAutoresizingMaskLayoutConstraint:0xc684400 h=-&- v=-&- UINavigationTransitionView:0xc6720e0.midX == UILayoutContainerView:0xc670770.midX>  Marker:0xc684400.marker{id: 385} 
<NSAutoresizingMaskLayoutConstraint:0xc684430 h=-&- v=-&- UINavigationTransitionView:0xc6720e0.width == UILayoutContainerView:0xc670770.width>  Marker:0xc684430.marker{id: 391} 
<NSAutoresizingMaskLayoutConstraint:0xc6844a0 h=-&- v=-&- UINavigationTransitionView:0xc6720e0.midY == UILayoutContainerView:0xc670770.midY>  Marker:0xc6844a0.marker{id: 392} 
<NSAutoresizingMaskLayoutConstraint:0xc6844d0 h=-&- v=-&- UINavigationTransitionView:0xc6720e0.height == UILayoutContainerView:0xc670770.height>  Marker:0xc6844d0.marker{id: 394} 
<NSAutoresizingMaskLayoutConstraint:0xc69ff40 h=--& v=--& UIView:0xc674820.midX == + 64>  Marker:0xc69ff40.marker{id: 469} 
<NSAutoresizingMaskLayoutConstraint:0xc69ff70 h=--& v=--& H:[UIView:0xc674820(320)]>  Marker:0xc69ff70.marker{id: 470} 
<NSAutoresizingMaskLayoutConstraint:0xc69ffa0 h=--& v=--& UIView:0xc674820.midY == + 284>  Marker:0xc69ffa0.marker{id: 473} 
<NSAutoresizingMaskLayoutConstraint:0xc6a03a0 h=-&- v=--& SearchResultCell:0xc6b2fd0.midX == UITableViewWrapperView:0x1186b2c0.midX>  Marker:0xc6a03a0.marker{id: 619} 
<NSAutoresizingMaskLayoutConstraint:0xc6a6a20 h=-&- v=--& V:[SearchResultCell:0xc6b2fd0(100)]>  Marker:0xc6a6a20.marker{id: 625} 
<NSAutoresizingMaskLayoutConstraint:0xc6ae660 h=--& v=--& UITableViewCellContentView:0xc6a7d10.midX == + 160>  Marker:0xc6ae660.marker{id: 593} 

и многое другое журнал о ходе автоматического и contentsize

+0

О NSAutoLayout должен быть в другом нить. – brianLikeApple

ответ

4

Это означает, ваш изменяемый NSSet изменяется при перечислении.

ОК, после проверки кода у вас есть небезопасный код. Вы используете MyAppDelegate.searchResultArray как источник данных вашей таблицы. Это то место, которое иногда вызывает крушение.

Просто подумайте, что, если MyAppDelegate.searchResultArray изменен во время загрузки UITableView?

Вы должны убедиться, что ваш источник данных должен быть статичным при загрузке табличного представления. Лучше установите его в том же классе, который является вашим ViewController.

+0

не могли бы вы объяснить мне ... больше ... Я не использовал NSSet в mu-коде. – vivek

+0

Вы использовали тип данных коллекции? как NSMutableArray или NSMuableSet? Когда вы перечисляете данные сбора, вы не должны изменять его при перечислении. Вы говорите, что не используете NSSet вообще в своем коде, но есть ли какие-либо методы, возвращающие NSSet? Потому что ваш журнал сбоев очень очевиден, говоря об этом. – brianLikeApple

+0

Или опубликовать связанный код. – brianLikeApple

0

У меня есть эта проблема с NSLayoutConstraint и множителем в ios 7, ios 8 работают отлично.

Я использую многоточечное значение whit 0.2 и вызывать ошибки! Изменить мультипликатор значения для 1 и получить размер экрана в постоянном значении для nslayoutconstraint.

NSLayoutConstraint (пункт: BT_Facebook, атрибут: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: ноль, атрибут: .width, умножитель: 0.2, константа: sizeBtRedeSociais)

Solution is usage size of screen, and not percent. 
var sizeBtRedeSociais = UIScreen.mainScreen().bounds.width/5 
var BT_FacebookWidth = NSLayoutConstraint(item: BT_Facebook, attribute: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: nil, attribute: .Width, multiplier: 1, constant: sizeBtRedeSociais) 
    var BT_TwitterWidth = NSLayoutConstraint(item: BT_Twitter, attribute: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: nil, attribute: .Width, multiplier: 1, constant: sizeBtRedeSociais) 
    var BT_InstagramWidth = NSLayoutConstraint(item: BT_Instagram, attribute: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: nil, attribute: .Width, multiplier: 1, constant: sizeBtRedeSociais) 
    var BT_GoogleWidth = NSLayoutConstraint(item: BT_Google, attribute: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: nil, attribute: .Width, multiplier: 1, constant: sizeBtRedeSociais) 
    var BT_YoutubeWidth = NSLayoutConstraint(item: BT_Youtube, attribute: NSLayoutAttribute.Width, relatedBy: .Equal, toItem: nil, attribute: .Width, multiplier: 1, constant: sizeBtRedeSociais)