我从 JSON 查询返回 10,000 条记录,它被分成 102 页,每页大约有 100 个对象。前 100 个项目加载正常,但随后停止加载更多项目。如何让它进入下一页?这通常是如何完成的?此代码过去仅用于 sqlite。现在我已经使用核心数据将它转换为一个新的应用程序,但它卡在了第一页。有什么我做错了吗?
这是 JSON nslog(最后几行)
"PageNo":1,"TotalPages":102,"RecordCount":10163}
-(void) serverDidFinishSending: (NSData *)responseData manager:(WebServiceCommunicator*)aManger requestURL:(NSURL *) url
{
//Added the code below just to test out apple's JSON serializer
NSError *error;
NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:responseData options:kNilOptions error:&error];
NSLog(@"dictionary %@",dictionary);
// Create the base object from factory.
//currently JSON serializer happens here
ReturnObjectFactory *aFactory = [[[ReturnObjectFactory alloc] init] autorelease];
id object = [aFactory createObjectWithClassName:_className fromData:responseData];
// Pass on the object to the target class and let that class deal with this object
if(_target && [_target respondsToSelector:@selector(didRecieveObject:sender:)])
[_target didRecieveObject:object sender:self];
谢谢!