I am showing some records in tableview. I am seeing vertical scroll is coming on screen but whenever I am clicking for scroll I am getting an SIGABRT error in main() function.
Why this error is coming ?
Thanks
Here are the code which is adding text in table view. This is written in viewdidload() function.
-(void) viewDidload() {
extern NSArray *wallvalue;
tableList = [[NSMutableArray alloc] initWithCapacity:[wallvalue count]];
for (NSDictionary *person in wallvalue) {
NSString *personName = [person objectForKey:@"message"];
if(![[NSNull null] isEqual:personName] && [personName length])
{
[tableList addObject:personName];
NSLog(personName);
}
}
}
And my error is occuring in main function which is below.
int main(int argc, char *argv[])
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retV开发者_JAVA技巧al = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Error is : Thread EXC_BAD_ACCESS in line (int retval= UIApplicationMain(argc, argv, nil, nil);
My guess is your numberOfRowsinsection
is more than what your having modal(data).while your trying to scroll the last objects will load in the cells through
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
method.
so once check your data while loading the cells once again.while your scrolling below method will always call
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
精彩评论