0
UITableView 및 setEditing에 다음과 같은 문제가 있습니다.UITableView/setEditing
처음으로보기가 완벽하게 보입니다. 이 라인에 충돌 두 번째 시간 : 디버거 콘솔에서
[1143:207] *** -[__NSArrayM count]: message sent to deallocated instance 0xb204700
: 같은 메시지와 함께
[myList setEditing:YES animated:YES];
.
내가 여기 코드의 두 관련 부분을 포함한다 :이 jQuery과 및 setEditing를 이용할 수 있도록 처음부터
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
myList=[[UITableView alloc] initWithFrame:CGRectZero];
[myList addGestureRecognizer:swipeRecognizer];
myList.backgroundColor=[UIColor colorWithRed:0.82 green:0.82 blue:0.82 alpha:0.6];
myList.dataSource=self;
myList.delegate=self;
[myList setEditing:YES animated:YES];
………
}
- (void)viewDidDisappear:(BOOL)animated {
[myList removeGestureRecognizer:swipeRecognizer];
[myList removeFromSuperview];
[myList release];
myList=nil;
[super viewDidDisappear:animated];
}
를, 내가 뭔가를 분명 누락 될 수 있습니다.
누구든지 내 코드에서 의심스러운 것을 볼 수 있습니까?
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.someArray count];
}
당신은 "someArray"변수가 아직도 주변에 있는지 확인해야합니다