我得到的服務數據,我成功地解析這樣哪些錯誤與我的功能
-(NSMutableArray *)clubTypes
{
NSMutableArray *dataArray = [[NSMutableArray alloc] init];
NSString *url = [NSString stringWithFormat:@"%@category",KWSURLList];
NSLog(@"%@",url);
NSDictionary * returnDict = (NSDictionary *) [self callWebService:url];
if([returnDict objectForKey:@"result"])
{
// NSDictionary * returnDictResult = (NSDictionary *) [returnDict objectForKey:@"result"];
NSArray *returnedArray = [returnDict objectForKey:@"data"];
for(NSDictionary *clubDict in returnedArray)
{
ClubTypeDC *clubDC = [[ClubTypeDC alloc] init];
clubDC.clubTypeID = [[clubDict objectForKey:@"Id"] intValue];
clubDC.clubTypeTitle = [clubDict objectForKey:@"tittle"];
clubDC.clubTypeImage = [clubDict objectForKey:@"icons"];
[dataArray addObject:clubDC];
// NSLog(@"%@",proEvents.proEventImage);
}
}
}
,但我總是在numberOfRowsInSection錯誤壞訪問。任何人都可以告訴我爲什麼?
給我們您的numberOfRowsInSecti在代碼:) – rdurand
和完整的錯誤文本 – rdurand
'callWebService:'方法是同步還是異步? – Akhilrajtr