{"id":220885,"date":"2014-04-28T10:31:03","date_gmt":"2014-04-28T06:31:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=220885"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=220885","title":{"rendered":"<span class=\"post_title\">\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c RestKit 0.22.x \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 \u0433\u0435\u0440\u043e\u0435\u0432 Marvel<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <b>REST<\/b>-\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0443\u0436\u0435 \u043f\u043b\u043e\u0442\u043d\u043e \u0432\u043e\u0448\u043b\u0438 \u0432 \u043d\u0430\u0448\u0443 \u0436\u0438\u0437\u043d\u044c. \u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 iOS, \u0447\u0430\u0441\u0442\u043e \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\/\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e, \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u201c\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432\u201d.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e Objective-C \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <b>RestKit<\/b> \u0434\u043b\u044f iOS \u0438 OSX \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 RESTful API. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0435\u0433\u043e \u0441\u0430\u043c\u044b\u0445 \u0446\u0435\u043d\u043d\u044b\u0445 \u0444\u0438\u0447 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0411\u0414, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>CoreData<\/b>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0445 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0443\u0447\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 API \u0432\u0441\u0435\u043c\u0438\u0440\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043a\u043e\u043c\u0438\u043a\u0441\u043e\u0432 Marvel.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Objective-C, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c iOS SDK, Core Data \u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043a\u0430\u043a \u0431\u043b\u043e\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/c35\/16e\/214\/c3516e214bbc45609e7bb36013e9833a.jpg\"\/><br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<h4>1. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043a\u043b\u044e\u0447\u0438 Marvel \u0438 \u0444\u043e\u0440\u043c\u0443\u043b\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u0434\u0430\u0447\u0443<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u043c\u0441\u044f \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 <a href=\"http:\/\/developer.marvel.com\">Marvel<\/a>.<br \/>  \u041f\u043e\u0441\u043b\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <a href=\"https:\/\/developer.marvel.com\/account\">Account<\/a> \u0438 \u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447\u0438.<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/9b1\/5a9\/405\/9b15a9405e0b43d5905b00a11faf550d.png\"\/><br \/>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <a href=\"http:\/\/developer.marvel.com\/docs\">Interactive Documentation<\/a> \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u043c \u043b\u044e\u0431\u0435\u0437\u043d\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 API. \u0423 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0431\u0430\u0437\u043e\u0439 \u0433\u0435\u0440\u043e\u0435\u0432, \u043a\u043e\u043c\u0438\u043a\u0441\u043e\u0432, \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0435\u0439, \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438 \u043c\u043d\u043e\u0433\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u043e\u0433\u043e. \u041d\u0430\u043c \u0436\u0435 \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u201c\u043f\u043e\u0449\u0443\u043f\u0430\u0442\u044c\u201d \u0447\u0442\u043e-\u0442\u043e \u043e\u0434\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c \u0435\u0433\u043e, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445.<\/p>\n<h4>2. \u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443<\/h4>\n<p>  \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 XCode. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0432\u044b\u0431\u0435\u0440\u0435\u043c iPhone \u0438 \u043d\u0435 \u0437\u0430\u0431\u0443\u0434\u0435\u043c \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0443 \u0432\u043e\u0437\u043b\u0435 \u043f\u043e\u043b\u044f \u201cuse Core Data\u201d \u0432 \u043e\u043a\u043d\u0435 \u043c\u0430\u0441\u0442\u0435\u0440\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0432\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043d\u0430 \u043f\u043e\u0440\u0442\u0430\u043b \u0438 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <a href=\"http:\/\/developer.marvel.com\/docs#!\/public\/getCreatorCollection_get_0\"><code>Character<\/code><\/a>:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Character object<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">Character { id (int, optional): The unique ID of the character resource., name (string, optional): The name of the character., description (string, optional): A short bio or description of the character., modified (Date, optional): The date the resource was most recently modified., resourceURI (string, optional): The canonical URL identifier for this resource., urls (Array[Url], optional): A set of public web site URLs for the resource., thumbnail (Image, optional): The representative image for this character., comics (ComicList, optional): A resource list containing comics which feature this character., stories (StoryList, optional): A resource list of stories in which this character appears., events (EventList, optional): A resource list of events in which this character appears., series (SeriesList, optional): A resource list of series in which this character appears. } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>\u0427\u0442\u043e \u0438\u0437 \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f? \u041f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c, \u0438\u043c\u0435\u043d\u0435\u043c, \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u043e\u0439 \u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 *.xcdatamodeld \u0444\u0430\u0439\u043b\u0443 \u0432 XCode \u0438 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c <code>Character<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c (\u0445\u043e\u0442\u044c \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e) \u043d\u0430\u0448\u0435\u043c\u0443 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0443.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/b81\/241\/b74\/b81241b744b540beb98ba6b11678b1ae.png\"\/><br \/>  \u042f \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u0432\u0430 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430: \u043f\u0435\u0440\u0432\u044b\u0439, <code>charID<\/code>, \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0436\u0438\u0442\u044c \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u201c\u0440\u043e\u0434\u043d\u043e\u0433\u043e Marvel\u2019\u043e\u0432\u0441\u043a\u043e\u0433\u043e\u201d <code>id<\/code> \u043d\u0430 \u0431\u0443\u0434\u0443\u0449\u0435\u0435, \u0432\u0442\u043e\u0440\u043e\u0439 \u0436\u0435, <code>innerID<\/code>, \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0434\u043b\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0410\u0442\u0440\u0438\u0431\u0443\u0442\u044b <code>charDescription<\/code> \u0438 name \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c description \u0438 name \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<br \/>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u044f \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u0432\u0430 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>thumbnailImageData<\/code> \u0438 <code>thumbnailURLString<\/code>, \u0445\u043e\u0442\u044f \u043e\u043d\u0438 \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0438 \u043e\u0434\u043d\u043e\u043c\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0443 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u042d\u0442\u043e \u0432\u044b\u0437\u0432\u0430\u043d\u043e \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 JSON-\u043e\u0442\u0432\u0435\u0442\u0435 <code>thumbnail<\/code> \u0442\u0438\u043f\u0430 <code>Image<\/code> \u0438 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044e. \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 <code>thumbnail<\/code> \u0438\u0437 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430:  <\/p>\n<pre><code class=\"javascript\">&quot;thumbnail&quot;: {           &quot;path&quot;: &quot;http:\/\/i.annihil.us\/u\/prod\/marvel\/i\/mg\/8\/c0\/4ce5a0e31f109&quot;,           &quot;extension&quot;: &quot;jpg&quot;         } <\/code><\/pre>\n<p>  \u0412 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e, \u043a\u0430\u043a \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u044d\u0442\u0438\u043c.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044f\u043c\u0438 Core Data \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0442\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c Objective-C \u043a\u043b\u0430\u0441\u0441, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0435\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c. \u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043a\u043b\u0430\u0441\u0441 <code>Character<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0430\u0432\u0442\u044c\u0441\u044f \u043e\u0442 <code>NSManagedObject<\/code>. \u0412\u043e\u0442 \u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"objectivec\">@interface Character : NSManagedObject {     NSDictionary *_thumbnailDictionary; } @property (nonatomic, retain) NSString *name; @property (nonatomic, retain) NSNumber *charID; @property (nonatomic, retain) NSNumber *innerID; @property (nonatomic, retain) NSString *charDescription; @property (nonatomic, retain) NSData *thumbnailImageData; @property (nonatomic, retain) NSString *thumbnailURLString; @property NSDictionary *thumbnailDictionary;  \/\/ \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e \u0432\u0441\u0435\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u0438\u0437 \u0431\u0430\u0437\u044b + (NSInteger)allCharsCountWithContext:(NSManagedObjectContext *)managedObjectContext; \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0433\u0435\u0440\u043e\u044f \u043f\u043e \u0435\u0433\u043e innerID. + (Character *)charWithManagedObjectContext:(NSManagedObjectContext *)context andInnerID:(NSInteger)charInnerID; @end <\/code><\/pre>\n<p>  \u0417\u0434\u0435\u0441\u044c, \u043f\u043e\u043c\u0438\u043c\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u0441\u043e\u043e\u0442\u0432\u0435\u0441\u0442\u0432\u0438\u0439, \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e <code>thumbnailDictionary<\/code>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0434\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c thumbnail, \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u044f \u043f\u0438\u0441\u0430\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0432\u044b\u0448\u0435. \u0422\u0430\u043a\u0436\u0435 \u044f \u0434\u043e\u0431\u0430\u0432\u0438\u043b \u0434\u0432\u0430 \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u0430 \u043a\u043b\u0430\u0441\u0441\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u043b\u0430\u0441\u0441\u043e\u0432.<\/p>\n<h4>3. \u041c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 RestKit<\/h4>\n<p>  \u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u043c \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0443 RestKit (\u0434\u0430\u043b\u0435\u0435 \u2014 RK). \u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u043e <a href=\"https:\/\/github.com\/RestKit\/RestKit\/wiki\/Installing-RestKit-v0.20.x-as-a-Git-Submodule\">\u0437\u0434\u0435\u0441\u044c<\/a> (\u0438\u043b\u0438 <a href=\"https:\/\/github.com\/RestKit\/RestKit\/wiki\/Installing-RestKit-v0.20.x-via-CocoaPods\">\u0437\u0434\u0435\u0441\u044c<\/a>, \u0435\u0441\u043b\u0438 \u0412\u044b \u2014 \u043b\u044e\u0431\u0438\u0442\u0435\u043b\u044c CocoaPods).<\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0441\u0442\u0430\u043d\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430-\u043e\u0431\u0435\u0440\u0442\u043a\u0438 <code>GDMarvelRKObjectManager<\/code> (\u043d\u0430\u0441\u043b\u0435\u0434\u043d\u0438\u043a <code>NSObject<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 RK, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438, \u043a\u0430\u043a <a href=\"http:\/\/restkit.org\/api\/latest\/Classes\/RKObjectManager.html\"><code>RKObjectManager<\/code><\/a> \u0438 <a href=\"http:\/\/restkit.org\/api\/latest\/Classes\/RKManagedObjectStore.html\"><code>RKManagedObjectStore<\/code><\/a>. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043c\u043e\u0436\u043d\u043e \u0438 \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c, \u043e\u0434\u043d\u0430\u043a\u043e \u043c\u044b \u043f\u043e\u0439\u0434\u0435\u043c \u043d\u0430 \u044d\u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043a\u043e\u0434 \u0432 \u043d\u0430\u0448\u0435\u043c \u0431\u0443\u0434\u0443\u0449\u0435\u043c \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435.<\/p>\n<p>  \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043e \u043a\u043b\u0430\u0441\u0441\u0430\u0445 RK. <code>RKManagedObjectStore<\/code> \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 Core Data, \u0442\u0430\u043a \u0447\u0442\u043e \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 <code>NSManagedObjectContext<\/code> \u0438\u043b\u0438 <code>NSManagedObjectModel<\/code> \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e. <code>RKObjectManager<\/code> \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u0430\u043f\u043f\u0438\u043d\u0433 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435) \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0443\u0436\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0432 JSON-\u043e\u0442\u0432\u0435\u0442\u0435, \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0435 \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430. \u041d\u0435 \u044d\u0442\u043e\u0433\u043e \u043b\u0438 \u043c\u044b \u0442\u0430\u043a \u0445\u043e\u0442\u0435\u043b\u0438 \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438?<br \/>  \u041d\u0435 \u0437\u0430\u0431\u0443\u0434\u044c\u0442\u0435 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043e\u043a RK <code>#import &lt;RestKit\/RestKit.h&gt;<\/code> \u0432 \u0432\u0430\u0448 *.h \u0444\u0430\u0439\u043b.<br \/>  \u041d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441-\u043e\u0431\u0435\u0440\u0442\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430:  <\/p>\n<pre><code class=\"objectivec\">@implementation GDMarvelRKObjectManager {     RKObjectManager *objectManager;     RKManagedObjectStore *managedObjectStore; } <\/code><\/pre>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e, \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<br \/>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432 <code>- (id)init<\/code> \u043c\u0435\u0442\u043e\u0434\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u043d\u0443\u0436\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 RK:  <\/p>\n<pre><code class=\"objectivec\">\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f AFNetworking HTTPClient NSURL *baseURL = [NSURL URLWithString:@&quot;http:\/\/gateway.marvel.com\/&quot;]; AFHTTPClient *client = [[AFHTTPClient alloc] initWithBaseURL:baseURL]; \/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f RKObjectManager objectManager = [[RKObjectManager alloc] initWithHTTPClient:client]; <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0431\u0443\u0434\u0443\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f. \u0427\u0442\u043e \u043d\u0430\u0441\u0447\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 Core Data? \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043b \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 RKManagedObjectStore.  <\/p>\n<pre><code class=\"objectivec\">- (void)configureWithManagedObjectModel:(NSManagedObjectModel *)managedObjectModel {         if (!managedObjectModel)         return;          managedObjectStore = [[RKManagedObjectStore alloc] initWithManagedObjectModel:managedObjectModel];     NSError *error;     if (!RKEnsureDirectoryExistsAtPath(RKApplicationDataDirectory(), &error))         RKLogError(@&quot;Failed to create Application Data Directory at path '%@': %@&quot;, RKApplicationDataDirectory(), error);          NSString *path = [RKApplicationDataDirectory() stringByAppendingPathComponent:@&quot;RKMarvel.sqlite&quot;];     if (![managedObjectStore addSQLitePersistentStoreAtPath:path                                      fromSeedDatabaseAtPath:nil                                           withConfiguration:nil options:nil error:&error])         RKLogError(@&quot;Failed adding persistent store at path '%@': %@&quot;, path, error);          [managedObjectStore createManagedObjectContexts];     objectManager.managedObjectStore = managedObjectStore; } <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u0430. \u041e\u043d\u0430 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0434\u0432\u0430 \u043d\u0430\u0448\u0438\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 RK-\u043e\u0431\u044a\u0435\u043a\u0442\u0430: <code>objectManager<\/code> \u0438 <code>managedObjectStore<\/code>.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043d\u0430\u0448\u0430 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u2014 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043b\u0430\u0441\u0441\u0435 <code>GDMarvelRKObjectManager<\/code> \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u0434\u0432\u0443\u0445 \u0433\u043b\u0430\u0432\u043d\u044b\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439: \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u043f\u043f\u0438\u043d\u0433\u0430 (\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u044f) \u043c\u0435\u0436\u0434\u0443 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e Core Data \u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u044d\u0442\u0438\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u043e\u0442 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430.<br \/>  \u041f\u0435\u0440\u0432\u0430\u044f \u0437\u0430\u0434\u0430\u0447\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u0435:  <\/p>\n<pre><code class=\"objectivec\">- (void)addMappingForEntityForName:(NSString *)entityName andAttributeMappingsFromDictionary:(NSDictionary *)attributeMappings        andIdentificationAttributes:(NSArray *)ids                     andPathPattern:(NSString *)pathPattern {     if (!managedObjectStore)         return;          RKEntityMapping *objectMapping = [RKEntityMapping mappingForEntityForName:entityName                                                          inManagedObjectStore:managedObjectStore]; \/\/ \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043c\u0430\u043f\u0438\u0442\u044c\u0441\u044f.     [objectMapping addAttributeMappingsFromDictionary:attributeMappings]; \/\/ \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c, \u043a\u0430\u043a\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u0430\u043c\u0438. \u0412\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0431\u044b\u043b\u043e \u0434\u0443\u0431\u043b\u0438\u043a\u0430\u0442\u043e\u0432 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u0435.     objectMapping.identificationAttributes = ids;      \/\/ \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0434\u0435\u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0440 \u043e\u0442\u0432\u0435\u0442\u0430, \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u0443\u044f\u0441\u044c \u043d\u0430 \u0444\u043e\u0440\u043c\u0430\u0442 \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0435\u0433\u043e \u0432 \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440.     RKResponseDescriptor *characterResponseDescriptor =     [RKResponseDescriptor responseDescriptorWithMapping:objectMapping                                                  method:RKRequestMethodGET                                             pathPattern:[NSString stringWithFormat:@&quot;%@%@&quot;, MARVEL_API_PATH_PATTERN, pathPattern]                                                 keyPath:@&quot;data.results&quot;                                             statusCodes:[NSIndexSet indexSetWithIndex:200]];     [objectManager addResponseDescriptor:characterResponseDescriptor]; } <\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043d\u0430\u0441 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0443 \u043c\u0435\u0442\u043e\u0434\u0430 <code>responseDescriptorWithMapping:...<\/code> \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445 \u2014 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>pathPattern<\/code>. \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043f\u0443\u0442\u0435\u043c \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438 \u043c\u0430\u043a\u0440\u043e\u0441\u0430 <code>MARVEL_API_PATH_PATTERN<\/code> (\u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>@&quot;v1\/public\/&quot;<\/code>) \u0438 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>pathPattern<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u0435\u043d <code>@&quot;characters&quot;<\/code>. \u0415\u0441\u043b\u0438 \u0436\u0435 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043d\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u0430, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0441\u043f\u0438\u0441\u043e\u043a \u043a\u043e\u043c\u0438\u043a\u0441\u043e\u0432, \u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 <code>@\u201dcomics\u201d<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0443\u0436\u0435 \u0432 \u0442\u0435\u043b\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0435\u0434\u0438\u043d\u0438\u0442\u0441\u044f \u0441 <code>@&quot;v1\/public\/&quot;<\/code>.<br \/>  \u0412\u0442\u043e\u0440\u043e\u0435 \u043d\u0435\u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2014 \u044d\u0442\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>@&quot;data.results&quot;<\/code> \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>keyPath<\/code>. \u041e\u0442\u043a\u0443\u0434\u0430 \u043e\u043d\u043e \u0432\u0437\u044f\u043b\u043e\u0441\u044c? \u0412\u0441\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e: Marvel \u043e\u0431\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u044e\u0442 \u0432\u0441\u0435 \u0441\u0432\u043e\u0438 \u043e\u0442\u0432\u0435\u0442\u044b \u0432 \u043e\u0434\u043d\u043e\u0442\u0438\u043f\u043d\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443, \u0438 \u0432\u0441\u0435 \u0441\u0442\u0430\u043d\u0435\u0442 \u043d\u0430 \u0441\u0432\u043e\u0438 \u043c\u0435\u0441\u0442\u0430, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0435\u0435 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">Characters wrapper<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"javascript\">{   &quot;code&quot;: &quot;int&quot;,   &quot;status&quot;: &quot;string&quot;,   &quot;copyright&quot;: &quot;string&quot;,   &quot;attributionText&quot;: &quot;string&quot;,   &quot;attributionHTML&quot;: &quot;string&quot;,   &quot;data&quot;: {     &quot;offset&quot;: &quot;int&quot;,     &quot;limit&quot;: &quot;int&quot;,     &quot;total&quot;: &quot;int&quot;,     &quot;count&quot;: &quot;int&quot;,     &quot;results&quot;: [       {         &quot;id&quot;: &quot;int&quot;,         &quot;name&quot;: &quot;string&quot;,         &quot;description&quot;: &quot;string&quot;,         &quot;modified&quot;: &quot;Date&quot;,         &quot;resourceURI&quot;: &quot;string&quot;,         &quot;urls&quot;: [           {             &quot;type&quot;: &quot;string&quot;,             &quot;url&quot;: &quot;string&quot;           }         ],         &quot;thumbnail&quot;: {           &quot;path&quot;: &quot;string&quot;,           &quot;extension&quot;: &quot;string&quot;         },         &quot;comics&quot;: {           &quot;available&quot;: &quot;int&quot;,           &quot;returned&quot;: &quot;int&quot;,           &quot;collectionURI&quot;: &quot;string&quot;,           &quot;items&quot;: [             {               &quot;resourceURI&quot;: &quot;string&quot;,               &quot;name&quot;: &quot;string&quot;             }           ]         },         &quot;stories&quot;: {           &quot;available&quot;: &quot;int&quot;,           &quot;returned&quot;: &quot;int&quot;,           &quot;collectionURI&quot;: &quot;string&quot;,           &quot;items&quot;: [             {               &quot;resourceURI&quot;: &quot;string&quot;,               &quot;name&quot;: &quot;string&quot;,               &quot;type&quot;: &quot;string&quot;             }           ]         },         &quot;events&quot;: {           &quot;available&quot;: &quot;int&quot;,           &quot;returned&quot;: &quot;int&quot;,           &quot;collectionURI&quot;: &quot;string&quot;,           &quot;items&quot;: [             {               &quot;resourceURI&quot;: &quot;string&quot;,               &quot;name&quot;: &quot;string&quot;             }           ]         },         &quot;series&quot;: {           &quot;available&quot;: &quot;int&quot;,           &quot;returned&quot;: &quot;int&quot;,           &quot;collectionURI&quot;: &quot;string&quot;,           &quot;items&quot;: [             {               &quot;resourceURI&quot;: &quot;string&quot;,               &quot;name&quot;: &quot;string&quot;             }           ]         }       }     ]   },   &quot;etag&quot;: &quot;string&quot; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0433\u0435\u0440\u043e\u0435\u0432, RK \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0439\u0442\u0438\u0441\u044c \u043f\u043e \u0441\u043b\u043e\u0432\u0430\u0440\u044f\u043c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u0432\u043d\u0438\u0437, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0434\u043e \u043d\u0443\u0436\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>@&quot;data.results&quot;<\/code> \u043a\u0430\u043a \u0440\u0430\u0437 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u043e\u0442 \u043f\u0443\u0442\u044c, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u043d\u0430\u0434\u043e \u201c\u0441\u043f\u0443\u0441\u0442\u0438\u0442\u044c\u0441\u044f\u201d.<\/p>\n<p>  \u0412\u0442\u043e\u0440\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u043c RK \u0431\u0443\u0434\u0435\u0442 <code>getMarvelObjectsAtPath<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0441\u0443\u0442\u0438 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a <code>getObjectsAtPath<\/code> \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 <code>RKObjectManager<\/code>. \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0443 \u043c\u0435\u0442\u043e\u0434\u0430 \u201c\u0433\u043e\u0432\u043e\u0440\u044f\u0449\u0435\u0435\u201d \u2014 \u0432\u044b \u0436\u0434\u0435\u0442\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432. \u0422\u0430\u043a \u043a\u0430\u043a Marvel <a href=\"http:\/\/developer.marvel.com\/documentation\/authorization\">\u0442\u0440\u0435\u0431\u0443\u044e\u0442<\/a>, \u0447\u0442\u043e\u0431\u044b \u0441 \u043a\u0430\u0436\u0434\u044b\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u043c \u0438\u043c \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u043b\u0441\u044f hash, timestamp \u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0439 \u043a\u043b\u044e\u0447, \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u043d\u043a\u0430\u043f\u0441\u0443\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044e \u044d\u0442\u0438\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043d\u0430\u0448 <code>getMarvelObjectsAtPath<\/code>. \u0412\u043e\u0442 \u043e\u043d:  <\/p>\n<pre><code class=\"objectivec\">- (void)getMarvelObjectsAtPath:(NSString *)path                     parameters:(NSDictionary *)params                        success:(void (^)(RKObjectRequestOperation *operation, RKMappingResult *mappingResult))success                        failure:(void (^)(RKObjectRequestOperation *operation, NSError *error))failure {     \/\/ \u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043d\u0443\u0436\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432     NSDateFormatter *formatter = [[NSDateFormatter alloc] init];     [formatter setDateFormat:@&quot;yyyyMMddHHmmss&quot;];     NSString *timeStampString = [formatter stringFromDate:[NSDate date]];          NSString *hash = [[[NSString stringWithFormat:@&quot;%@%@%@&quot;, timeStampString, MARVEL_PRIVATE_KEY, MARVEL_PUBLIC_KEY] MD5String] lowercaseString];          NSMutableDictionary *queryParams = [NSMutableDictionary dictionaryWithDictionary:@{@&quot;apikey&quot; : MARVEL_PUBLIC_KEY,                                                                                        @&quot;ts&quot; : timeStampString,                                                                                        @&quot;hash&quot; : hash}];     if (params)         [queryParams addEntriesFromDictionary:params];          \/\/ \u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0437\u043e\u0432 \u043c\u0435\u0442\u043e\u0434\u0430 \u0443 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 objectManager \u0441 \u0432\u043d\u043e\u0432\u044c \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438     [objectManager getObjectsAtPath:[NSString stringWithFormat:@&quot;%@%@&quot;, MARVEL_API_PATH_PATTERN, path]                                            parameters:queryParams                                               success:success                                               failure:failure]; } <\/code><\/pre>\n<p>  \u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0438\u0437 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438 \u043d\u0430\u0434 <code>NSString<\/code> \u2014 <code>MD5String<\/code>. \u041a\u0430\u043a \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c MD5-\u0442\u0440\u043e\u043a\u0443 \u043e\u0442 \u0441\u0442\u0440\u043e\u043a\u0438, <a href=\"http:\/\/lmgtfy.com\/?q=Objective+C+MD5+NSString\">\u043f\u043e\u0438\u0449\u0438\u0442\u0435 \u0432 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0435<\/a>.<br \/>  \u0423 \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0435\u0449\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043c\u0435\u0442\u043e\u0434 <code>- (NSManagedObjectContext *)managedObjectContext<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 <code>managedObjectStore<\/code>. \u0422\u0430\u043a\u0436\u0435 \u044d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u0431\u0443\u0434\u0435\u0442 \u0441\u0438\u043d\u0433\u043b\u0442\u043e\u043d\u043e\u043c (<a href=\"http:\/\/ru.wikipedia.org\/wiki\/\u041e\u0434\u0438\u043d\u043e\u0447\u043a\u0430_(\u0448\u0430\u0431\u043b\u043e\u043d_\u043f\u0440\u043e\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f)#.D0.9F.D1.80.D0.B8.D0.BC.D0.B5.D1.80_.D0.BD.D0.B0_Objective-C\">Singleton<\/a>) \u0441 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>+ (GDMarvelRKObjectManager *)manager<\/code> \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u043a \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0443.<\/p>\n<h4>4. \u0413\u043b\u0430\u0432\u043d\u044b\u0439 ViewController<\/h4>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <code>GDBaseViewController<\/code>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u043d\u043e\u0432\u044b\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c <code>- (void)animateActivityIndicator:(BOOL)animate<\/code>. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 <code>viewDidLoad<\/code> \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u044d\u0442\u043e\u0442 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u0442\u0438\u043f\u0430 <code>UIActivityIndicatorView<\/code>, \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>UIActivityIndicatorView *activityIndicator<\/code> \u0438 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0435\u0433\u043e \u043d\u0430 <code>self.view<\/code>.<br \/>  \u0412 \u0441\u0430\u043c\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f\/\u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0430\u043d\u0438\u043c\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">animateActivityIndicator: code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">- (void)animateActivityIndicator:(BOOL)animate {     activityIndicator.hidden = !animate;     if (animate) {         [self.view bringSubviewToFront:activityIndicator];         [activityIndicator startAnimating];     }     else         [activityIndicator stopAnimating]; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <code>YES<\/code> \u0434\u043b\u044f \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430, \u043d\u0430\u0448 \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0432\u043e\u0442 \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/484\/61e\/8b1\/48461e8b141f40a4aee6c7d97090ed62.png\"\/><\/p>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 <code>GDMainViewController<\/code> \u0443\u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430. \u0412\u043e\u0442 \u0435\u0433\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435:  <\/p>\n<pre><code class=\"objectivec\">@interface GDMainViewController : GDBaseViewController &lt;UITableViewDataSource, UITableViewDelegate, UIAlertViewDelegate&gt; {     UITableView *table;     NSInteger numberOfCharacters;     AllAroundPullView *bottomPullView;     BOOL noRequestsMade; } @end <\/code><\/pre>\n<p>  \u0412 \u044d\u0442\u043e\u043c \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0411\u0414. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 <code>UITableView<\/code>, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0430 \u0438 \u0438\u043c\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439. \u041d\u043e \u0438\u0445 \u043d\u0430\u0434\u043e \u0435\u0449\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0437\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0430\u044f \u0431\u0430\u0437\u0430 \u043f\u0443\u0441\u0442\u0430. \u041f\u043e\u0441\u043b\u0435 \u0432\u0441\u0435\u0433\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u043f\u0440\u0438\u0441\u0443\u0449\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>UITableView<\/code> \u0432 \u043c\u0435\u0442\u043e\u0434\u0435 <code>- (void)viewDidLoad<\/code>, \u043c\u044b \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c \u043d\u0430\u0448\u0443 CoreData-\u043c\u043e\u0434\u0435\u043b\u044c \u043a <code>RKManagedObjectStore<\/code>, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0448 \u043a\u043b\u0430\u0441\u0441-\u043e\u0431\u0435\u0440\u0442\u043a\u0443 <code>GDMarvelRKObjectManager<\/code>:  <\/p>\n<pre><code class=\"objectivec\">NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@&quot;Marvel&quot; withExtension:@&quot;momd&quot;];     [[GDMarvelRKObjectManager manager] configureWithManagedObjectModel:[[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL]]; \/\/ \u0417\u0430\u0442\u0435\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043c\u0430\u043f\u043f\u0438\u043d\u0433 \u0434\u043b\u044f \u043d\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0442\u0438\u043f\u0430 Character: [[GDMarvelRKObjectManager manager] addMappingForEntityForName:@&quot;Character&quot;                                andAttributeMappingsFromDictionary:@{                                                                     @&quot;name&quot; : @&quot;name&quot;,                                                                     @&quot;id&quot; : @&quot;charID&quot;,                                                                     @&quot;thumbnail&quot; : @&quot;thumbnailDictionary&quot;,                                                                     @&quot;description&quot; : @&quot;charDescription&quot;                                                                     }                                       andIdentificationAttributes:@[@&quot;charID&quot;]                                                    andPathPattern:MARVEL_API_CHARACTERS_PATH_PATTERN]; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>andAttributeMappingsFromDictionary:<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0438\u0437 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0439 \u043c\u0435\u0436\u0434\u0443 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f\u043c\u0438 JSON-\u043a\u043b\u044e\u0447\u0435\u0439 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u0430 \u0438 \u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>andPathPattern:<\/code> \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 <code>@&quot;characters&quot;<\/code> (\u043c\u0430\u043a\u0440\u043e\u0441 <code>MARVEL_API_CHARACTERS_PATH_PATTERN<\/code>) \u2014 \u0438\u043c\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0433\u043e JSON-\u043e\u0431\u044a\u0435\u043a\u0442\u0430.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043c\u0430\u043f\u043f\u0438\u043d\u0433, \u0432\u044b\u0437\u043e\u0432\u0435\u043c \u043c\u0435\u0442\u043e\u0434 <code>[self loadCharacters]<\/code>.<br \/>  \u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e, \u0447\u0442\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442:  <\/p>\n<pre><code class=\"objectivec\">- (void)loadCharacters {     numberOfCharacters = [Character allCharsCountWithContext:[[GDMarvelRKObjectManager manager] managedObjectContext]];       if (noRequestsMade && numberOfCharacters &gt; 0) {         noRequestsMade = NO;         return;     }     [self animateActivityIndicator:YES];     noRequestsMade = NO;          [[GDMarvelRKObjectManager manager] getMarvelObjectsAtPath:MARVEL_API_CHARACTERS_PATH_PATTERN                                                    parameters:@{@&quot;offset&quot; : @(numberOfCharacters)}                                                       success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {                                                           [self animateActivityIndicator:NO];                                                                                                                      NSInteger newInnerID = numberOfCharacters;                                                           for (Character *curCharacter in mappingResult.array) {                                                               if ([curCharacter isKindOfClass:[Character class]]) {                                                                   curCharacter.innerID = @(newInnerID);                                                                   newInnerID++;                                                                   \/\/\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 (\u0430 \u043d\u0435 \u0432\u0441\u0435\u0445 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u043e\u0441\u043b\u0435 \u0446\u0438\u043a\u043b\u0430), \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0442\u0438\u0442\u044c \u043f\u043e\u0442\u0435\u0440\u0438, \u0435\u0441\u043b\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0430\u0432\u0430\u0440\u0438\u0439\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u0441\u044f \u0432 \u0441\u0435\u0440\u0435\u0434\u0438\u043d\u0435 \u0446\u0438\u043a\u043b\u0430                                                                   [self saveToStore];                                                               }                                                           }                                                                                                                      numberOfCharacters = newInnerID;                                                           [table reloadData];                                                           bottomPullView.hidden = NO;                                                           [bottomPullView finishedLoading];                                                       }                                                       failure:^(RKObjectRequestOperation *operation, NSError *error) {                                                           [bottomPullView finishedLoading];                                                           [[[UIAlertView alloc] initWithTitle:@&quot;Marvel API Error&quot; message:operation.error.localizedDescription delegate:self cancelButtonTitle:@&quot;Cancel&quot; otherButtonTitles:@&quot;Retry&quot;, nil] show];                                                       }]; } <\/code><\/pre>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0431\u0449\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439 \u0438\u0437 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0431\u0430\u0437\u044b, \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0443 \u044f\u0447\u0435\u0435\u043a \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u0435. \u041f\u0440\u0438 \u043f\u0435\u0440\u0432\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043d\u043e, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0432\u043d\u044f\u0442\u044c\u0441\u044f \u043d\u0443\u043b\u044e. \u042d\u0442\u043e \u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 offset \u043f\u0440\u0438 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0438 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u0435\u0440\u0432\u0435\u0440 Marvel \u0431\u0443\u0434\u0435\u0442 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u043e\u0432\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0433\u0435\u0440\u043e\u0435\u0432 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0433\u0435\u0440\u043e\u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u0430\u0447\u043a\u0430\u043c\u0438 \u043f\u043e 20 \u0448\u0442\u0443\u043a \u0432 \u043a\u0430\u0436\u0434\u043e\u0439).<br \/>  \u0414\u0430\u043b\u0435\u0435 \u043c\u044b \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u043c \u0442\u043e\u0442 \u0441\u0430\u043c\u044b\u0439 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043d\u0430\u0448 \u043c\u0435\u0442\u043e\u0434-\u043e\u0431\u0435\u0440\u0442\u043a\u0443 <code>getMarvelObjectsAtPath<\/code>:<br \/>  \u0423 \u044d\u0442\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u0434\u0432\u0430 \u0432\u0430\u0436\u043d\u044b\u0445 \u0434\u043b\u044f \u043d\u0430\u0441 \u0441\u0435\u0439\u0447\u0430\u0441 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u2014 \u044d\u0442\u043e success: \u0438 failure:, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u043c\u0438 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0438 \u043d\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e. \u0418\u0442\u0430\u043a, \u043f\u0440\u0438 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u043c\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u043d\u0438\u0445 <code>innerID<\/code>, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u0438\u0445 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0431\u0430\u0437\u0443 \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0431\u0449\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0433\u0435\u0440\u043e\u0435\u0432. \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0421\u0430\u043c\u0430\u044f \u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043c\u0430\u0433\u0438\u044f \u0437\u0434\u0435\u0441\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0443\u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u0432 \u043d\u0430\u0448\u0435\u043c CoreData-\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435 \u2014 RK \u0441\u0434\u0435\u043b\u0430\u043b \u044d\u0442\u043e \u0437\u0430 \u043d\u0430\u0441. (\u0421\u0442\u043e\u0438\u0442 \u043e\u0442\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u044d\u0442\u043e \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445 \u043f\u043e\u043b\u0435\u0439\/\u0441\u0432\u043e\u0439\u0441\u0442\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0437\u0430\u0434\u0430\u043d\u044b \u043c\u0430\u043f\u043f\u0438\u043d\u0433-\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0432\u0438\u044f. \u0422\u0430\u043a, \u0432 \u043a\u043e\u0434\u0435 \u0432\u044b\u0448\u0435 \u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <code>innerID<\/code> \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441\u043e\u0445\u0430\u043d\u044f\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e, \u0432\u044b\u0437\u0432\u0430\u0432 <code>[self saveToStore]<\/code>).<br \/>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u043c \u0435\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0438 \u043d\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0442\u0430\u0431\u043b\u0438\u0446\u0443.<\/p>\n<p>  \u0412 \u043a\u043e\u0434\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043c\u0435\u0442\u043e\u0434 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0432 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435:  <\/p>\n<pre><code class=\"objectivec\">- (void)saveToStore {     NSError *saveError;     if (![[[GDMarvelRKObjectManager manager] managedObjectContext] saveToPersistentStore:&saveError])         XLog(@&quot;%@&quot;, [saveError localizedDescription]); } <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0432\u044b \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u0435 \u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u0430 <code>bottomPullView<\/code>. \u042d\u0442\u0430 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u0438\u0442 \u043e\u0431\u044a\u0435\u043a\u0442 \u0442\u0438\u043f\u0430 <code>AllAroundPullView<\/code> (<a href=\"https:\/\/github.com\/r-plus\/AllAroundPullView\">c\u0442\u044f\u043d\u0443\u0442\u044c \u0441 GitHub<\/a>) \u2014 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b, \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0438\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 Pull-To-Resfresh \u0441\u043e \u0432\u0441\u0435\u0445 \u0441\u0442\u043e\u0440\u043e\u043d \u0432\u0430\u0448\u0435\u0433\u043e <code>UIScrollView<\/code>. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u0443\u044e \u043f\u043e\u0440\u0446\u0438\u044e \u043d\u0430\u0448\u0438\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439, \u0434\u043e\u0439\u0434\u044f \u0434\u043e \u043d\u0438\u0436\u043d\u0435\u0433\u043e \u043a\u0440\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0438 \u043f\u043e\u0442\u044f\u043d\u0443\u0432 \u0435\u0435 \u0432\u0432\u0435\u0440\u0445.<br \/>  \u0420\u0430\u043d\u0435\u0435 \u0432 <code>- (void)viewDidLoad<\/code> \u044d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u0431\u044b\u043b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<pre><code class=\"objectivec\">bottomPullView = [[AllAroundPullView alloc] initWithScrollView:table position:AllAroundPullViewPositionBottom action:^(AllAroundPullView *view){         [self loadCharacters];     }];     bottomPullView.hidden = YES;     [table addSubview:bottomPullView]; <\/code><\/pre>\n<p>  \u041a\u0430\u043a \u0432\u0438\u0434\u0438\u0442\u0435, \u0432 \u0442\u0435\u043b\u0435 \u0431\u043b\u043e\u043a\u0430, \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 action: \u043c\u044b \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u043b\u0438 \u0432\u0441\u0435 \u0442\u043e\u0442 \u0436\u0435 \u043c\u0435\u0442\u043e\u0434 \u043f\u043e\u0434\u0433\u0440\u0443\u0437\u043a\u0438 \u043d\u043e\u0432\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 <code>loadCharacters<\/code>.<\/p>\n<p>  \u0427\u0442\u043e \u0436, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0435 \u0438 \u0434\u043e\u0436\u0434\u0435\u043c\u0441\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u043e\u0442\u0432\u0435\u0442\u0430. \u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0448\u043b\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0438 \u043b\u043e\u0433\u0433\u0435\u0440 RK \u0432\u044b\u0432\u0435\u043b \u0447\u0442\u043e-\u0442\u043e \u043d\u0430\u043f\u043e\u0434\u043e\u0431\u0438\u0435 <i><code>I restkit.network:RKObjectRequestOperation.m:220 GET 'http:\/\/your-url.here' (200 OK \/ 20 objects)<\/code><\/i>, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0441\u044c \u043b\u0438 \u043d\u0430\u0448\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0432 \u0431\u0430\u0437\u0443.<br \/>  \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0437\u0430\u0439\u0434\u0435\u043c \u0432 \u043f\u0430\u043f\u043a\u0443 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440\u0430, \u043d\u0430\u0439\u0434\u0435\u043c \u0442\u0430\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u043f\u0430\u043f\u043a\u0443 Documents. \u0422\u0430\u043c \u0434\u043e\u043b\u0436\u043d\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0431\u0430\u0437\u0430 <code>RKMarvel.sqlite<\/code> (\u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u0438\u043c\u044f \u043c\u044b \u0443\u043a\u0430\u0437\u0430\u043b\u0438 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>addSQLitePersistentStoreAtPath:<\/code> \u0440\u0430\u043d\u0435\u0435). \u041e\u0442\u043a\u0440\u043e\u0435\u043c \u044d\u0442\u0443 \u0431\u0430\u0437\u0443 \u0432 SQLite-\u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u0438 \u0443\u0434\u043e\u0441\u0442\u043e\u0432\u0435\u0440\u0438\u043c\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0438 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u044b:<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/fc8\/da1\/e29\/fc8da1e29fb1451082bf1c78dd7d7f8d.png\"\/><br \/>  \u0423\u0440\u0430! \u0423 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0433\u0435\u0440\u043e\u0435\u0432 \u0434\u0430\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0421\u0430\u043c\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e\u0433\u043e \u00ab\u0434\u043e\u0431\u0440\u0430\u00bb.<\/p>\n<h4>5. \u0421\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435.<\/h4>\n<p>  \u042f \u0437\u043d\u0430\u044e, \u0447\u0442\u043e \u043d\u0435\u0442\u0435\u0440\u043f\u0435\u043b\u0438\u0432\u044b\u0439 \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0434\u0430\u0432\u043d\u043e \u0445\u043e\u0447\u0435\u0442 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u0438\u043c\u044b\u0445 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043d\u0430\u0448\u0435\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0432\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0442\u0438\u043f\u0430 <code>UITableView<\/code> (\u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044e \u0443\u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e), \u0430 \u0441\u0440\u0430\u0437\u0443 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043c\u0435\u0442\u043e\u0434\u0443 \u0434\u0435\u043b\u0435\u0433\u0430\u0442\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u044f\u0447\u0435\u0439\u043a\u0438:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">tableView:cellForRowAtIndexPath: code<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"objectivec\">- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {     NSInteger row = indexPath.row;     NSString *reusableIdentifier = [NSString stringWithFormat:@&quot;%d&quot;, row % 2];     UITableViewCell *cell = [table dequeueReusableCellWithIdentifier:reusableIdentifier];     if (!cell) {         cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reusableIdentifier];         cell.autoresizingMask = UIViewAutoresizingFlexibleWidth;     }          [[cell.contentView subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)];          if (numberOfCharacters &gt; row) {         Character *curCharacter = [Character charWithManagedObjectContext:                                    [[GDMarvelRKObjectManager manager] managedObjectContext]                                                             andInnerID:row];         if (curCharacter) {             BOOL charHasDescription = ![curCharacter.charDescription isEqualToString:@&quot;&quot;];             UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(70, 0, CGRectGetWidth(cell.contentView.frame) - 70 - (charHasDescription ? 60 : 0), 60)];             label.backgroundColor = [UIColor clearColor];             label.text = curCharacter.name;             label.autoresizingMask = UIViewAutoresizingFlexibleWidth;             [cell.contentView addSubview:label];                          GDCellThumbnailView *thumbnail = [GDCellThumbnailView thumbnail];             if (curCharacter.thumbnailImageData)                 [thumbnail setImage:[UIImage imageWithData:curCharacter.thumbnailImageData]];             else                 [self loadThumbnail:thumbnail fromURLString:curCharacter.thumbnailURLString forCharacter:curCharacter];             [cell.contentView addSubview:thumbnail];                          cell.accessoryType = charHasDescription ? UITableViewCellAccessoryDetailButton : UITableViewCellSelectionStyleNone;             cell.selectionStyle = charHasDescription ? UITableViewCellSelectionStyleGray : UITableViewCellSelectionStyleNone;         }     }          return cell; } <\/code><\/pre>\n<\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u0440\u0435\u0434\u043d\u043e\u0439 \u044f\u0447\u0435\u0439\u043a\u0438 \u043c\u044b \u0434\u043e\u0441\u0442\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0433\u0435\u0440\u043e\u044f \u0438\u0437 \u0431\u0430\u0437\u044b \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0435\u0433\u043e \u0438\u043c\u044f, \u0442\u0430\u043a\u0436\u0435 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043b\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043d\u0435\u043c, \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u0435\u043c \u043d\u0430 \u044f\u0447\u0435\u0439\u043a\u0443 \u043a\u043d\u043e\u043f\u043a\u0443, \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e\u0442\u043e\u043c \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u043c. \u041d\u0443 \u0438 \u0441\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u2014 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0430. \u042f \u0441\u043e\u0437\u0434\u0430\u043b \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u043b\u0430\u0441\u0441 <code>GDCellThumbnailView<\/code>, \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f \u0438 \u043f\u043e\u043c\u0435\u0449\u0430\u044e \u043d\u0430 \u044f\u0447\u0435\u0439\u043a\u0443. \u041e\u043d \u043d\u0435 \u0434\u0435\u043b\u0430\u0435\u0442 \u043d\u0438\u0447\u0435\u0433\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0433\u043e, \u043f\u0440\u043e\u0441\u0442\u043e \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u043c \u201c\u043a\u0440\u0443\u0442\u044f\u0449\u0438\u0439\u0441\u044f \u0446\u0432\u0435\u0442\u043e\u0447\u0435\u043a\u201d \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f, \u043f\u043e\u043a\u0430 thumbnail \u043d\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u0441\u044f.<\/p>\n<p>  \u041f\u0440\u0438 \u043f\u0443\u0441\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u0430 <code>loadThumbnail:fromURLString:forCharacter:<\/code> \u043d\u0430\u0448 \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440 \u0442\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/51f\/210\/42c\/51f21042c25049bc854513209daa874f.png\"\/><\/p>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0433\u0435\u0440\u043e\u044f. \u0422\u0430\u043a \u043a\u0430\u043a RK \u0443\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a <a href=\"https:\/\/github.com\/AFNetworking\/AFNetworking\"><code>AFNetworking<\/code><\/a>, \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0430\u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c Marvel \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a:  <\/p>\n<pre><code class=\"objectivec\">- (void)loadThumbnail:(GDCellThumbnailView *)view fromURLString:(NSString *)urlString forCharacter:(Character *)character {     XLog(@&quot;Loading thumbnail for %@&quot;, character.name);     AFHTTPRequestOperation *operation = [[AFHTTPRequestOperation alloc] initWithRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];     [operation setCompletionBlockWithSuccess:^(AFHTTPRequestOperation *operation, id responseObject) {         character.thumbnailImageData = responseObject;         [self saveToStore];         [view setImage:[UIImage imageWithData:responseObject]];     } failure:^(AFHTTPRequestOperation *operation, NSError *error) {         XLog(@&quot;%@&quot;, [error localizedDescription]);     }];     [operation start]; } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0435\u0449\u0435 \u0440\u0430\u0437. \u0423\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/9d4\/85d\/8b6\/9d485d8b6bad40ecbcd01c3b5f5ca3be.png\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0431\u0443\u0434\u0435\u0442 \u0442\u0440\u0443\u0434\u043d\u043e \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f, \u0438 \u044f \u0441 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0443\u0434\u043e\u0431\u043d\u044b\u0439 Pull-To-Refresh \u043a\u043e\u043d\u0442\u0440\u043e\u043b \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0431\u043e\u043b\u044c\u0448\u0435\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435\u0439. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u043a\u0430\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u0448\u0430 \u0431\u0430\u0437\u0430.<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/58a\/f80\/53c\/58af8053cbac41eaa3fdf56064d2bc8b.png\"\/> <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/d0f\/a1e\/c32\/d0fa1ec32a7448c29061da2189e4970d.png\"\/><br \/>  \u0422\u0435\u043f\u0435\u0440\u044c \u0438 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438, \u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u0433\u0435\u0440\u043e\u044f\u0445 (\u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u0443\u0441\u043f\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c) \u0431\u0443\u0434\u0443\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u0435\u0441\u0442\u044c \u0443 \u043d\u0430\u0441 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441 \u0418\u043d\u0442\u0435\u0440\u043d\u0435\u0442 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<h4>6. \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435.<\/h4>\n<p>  RestKit \u043f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u0441 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439: \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f, \u043e\u0442\u0432\u0435\u0442\u044b \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f, \u043e\u0431\u044a\u0435\u043a\u0442\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438. \u041d\u0435 \u0432\u0441\u0435\u043c \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u0440\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u0441\u0430\u043c \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435: \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0447\u0442\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u0435\u0435 \u0431\u044b\u043b\u043e \u0431\u044b \u0441\u0440\u0430\u0437\u0443 \u0432\u044b\u043a\u0430\u0447\u0430\u0442\u044c \u0432\u0441\u044e \u0431\u0430\u0437\u0443 \u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u043d\u0435\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u0410\u0432\u0442\u043e\u0440 \u0441\u0447\u0438\u0442\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438 RK \u0442\u0430\u043a\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u0441\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 (\u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u044e\u0449\u0435\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0447\u0430\u0441\u0442\u044c\u044e \u0441 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043e \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u043c \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u0436\u0435) \u043c\u043e\u0436\u043d\u043e <a href=\"https:\/\/github.com\/coffellas-cto\/marvel-characters\">\u0441\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430 GitHub<\/a>. \u0412\u0430\u0448\u0438 \u043f\u043e\u0436\u0435\u043b\u0430\u043d\u0438\u044f \u0438 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0435\u0432 \u043a \u0441\u0442\u0430\u0442\u044c\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0443\u043b-\u0440\u0435\u043a\u0432\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 GitHub.<br \/>  \u041d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0438\u043c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u2014 \u043d\u0430 \u0441\u0435\u0439 \u0440\u0430\u0437 \u044d\u0442\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043d\u0430\u0436\u0430\u0442\u0438\u044e \u043d\u0430 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0443 \u201cinfo\u201d \u0432\u043e\u0437\u043b\u0435 \u0438\u043c\u0435\u043d\u0438 \u0433\u0435\u0440\u043e\u044f \u0432 \u0433\u043b\u0430\u0432\u043d\u043e\u043c \u0432\u044c\u044e-\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435. \u0423\u0436 \u043e\u0447\u0435\u043d\u044c \u0434\u043e\u043b\u0433\u043e \u044f \u043f\u0440\u043e\u043a\u0440\u0443\u0447\u0438\u0432\u0430\u043b \u0441\u0432\u043e\u044e \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0447\u0442\u043e\u0431 \u043d\u0430\u043a\u043e\u043d\u0435\u0446 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e:<br \/>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/ea8\/f74\/b90\/ea8f74b90775479d91af69e113236ef4.png\"\/> \t\t\t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/220885\/\"> http:\/\/habrahabr.ru\/post\/220885\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t\u0412\u0435\u0431-\u0441\u0435\u0440\u0432\u0438\u0441\u044b, \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0449\u0438\u0435 <b>REST<\/b>-\u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443, \u0443\u0436\u0435 \u043f\u043b\u043e\u0442\u043d\u043e \u0432\u043e\u0448\u043b\u0438 \u0432 \u043d\u0430\u0448\u0443 \u0436\u0438\u0437\u043d\u044c. \u0420\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 iOS, \u0447\u0430\u0441\u0442\u043e \u0442\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u0440\u0438\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0438 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\/\u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0442\u044c \u0438\u0445 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043b\u0435\u0433\u043a\u043e \u0438 \u043d\u0435\u043f\u0440\u0438\u043d\u0443\u0436\u0434\u0435\u043d\u043d\u043e, \u043d\u0435 \u043f\u0440\u0438\u0431\u0435\u0433\u0430\u044f \u043a \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u044e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u201c\u0432\u0435\u043b\u043e\u0441\u0438\u043f\u0435\u0434\u043e\u0432\u201d.<\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0433\u043e Objective-C \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 <b>RestKit<\/b> \u0434\u043b\u044f iOS \u0438 OSX \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 RESTful API. \u041d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0435\u0433\u043e \u0441\u0430\u043c\u044b\u0445 \u0446\u0435\u043d\u043d\u044b\u0445 \u0444\u0438\u0447 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u0443\u044e \u0411\u0414, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>CoreData<\/b>. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0432\u043c\u0435\u0441\u0442\u0435 \u043f\u0440\u043e\u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043e\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0434\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0438 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438\u0445 \u043d\u0430 \u043d\u0430\u0448\u0435\u043c iOS-\u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435. \u0410 \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u043c \u043d\u0435 \u0431\u044b\u043b\u043e \u0441\u043a\u0443\u0447\u043d\u043e, \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 API \u0432\u0441\u0435\u043c\u0438\u0440\u043d\u043e \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u043f\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0441\u0442\u0432\u0443 \u043a\u043e\u043c\u0438\u043a\u0441\u043e\u0432 Marvel.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043d\u0435\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 \u0442\u0443\u0442\u043e\u0440\u0438\u0430\u043b\u0430. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0447\u0438\u0442\u0430\u0442\u0435\u043b\u044c \u0443\u0436\u0435 \u0437\u043d\u0430\u043a\u043e\u043c \u0441 \u0431\u0430\u0437\u043e\u0432\u044b\u043c\u0438 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f\u043c\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 Objective-C, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c iOS SDK, Core Data \u0438 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u043d\u044f\u0442\u0438\u044f \u043a\u0430\u043a \u0431\u043b\u043e\u043a\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"\/\/habrastorage.org\/files\/c35\/16e\/214\/c3516e214bbc45609e7bb36013e9833a.jpg\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-220885","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/220885","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=220885"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/220885\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=220885"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=220885"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=220885"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}