先貼下程式碼
-(void)api:(NSString*)apiName successWithData:(id)responseData
{
if ([apiName isEqualToString:kApi_image_list]) //比较apiName是否等于kApi_image_list (isEqualToString是字符串间的比较,==是指针间的比较)
{
[self.datas setArray:responseData];
}
[self.refreshControl endRefreshing];
self.refreshControl.attributedTitle=[[NSAttributedString alloc]initWithString:@"下拉刷新"
attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
[self.tableView reloadData];
}
報錯程式碼libc++abi.dylib: terminating with uncaught exception of type NSException