mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-17 12:20:20 +08:00
Initialization I need the object paginator's object loaders to know about the various header settings of the RKClient when it constructs them. However, the paginator should not depend on an RKObjectManager. The proposed solution is to pass a block that lets an outsider custom configure the object loaders that get created. The object manager shows how it is done. Error Handling We don't want to have a separate set of error handling if using a paginator versus using an RKObjectLoader. When an error is encountered, the paginator should allow access to the underlying RKObjectRequest that produced the error. Cleanup The contained object loader needs to nil out the delegate before going away. NSLogs changed to RKLog Pagination computation The page count can be computed when the pagination parameters are mapped. Note you must use the ceil operation to compute this value. If there are 3.1 pages that means there are 4 pages.