Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Film.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,17 @@
#import <Mantle/Mantle.h>

@interface Film : MTLModel <MTLJSONSerializing>

@property (nonatomic, strong) NSString *ID;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *imageURL;
@property (nonatomic, strong) NSString *rating;
@property (nonatomic, strong) NSString *premiereDate;
@property (nonatomic, strong) NSString *country;
@property (nonatomic, strong) NSString *ratingMPAA;
@property (nonatomic, strong) NSString *filmLength;
@property (nonatomic, strong) NSString *filmDescription;
@property (nonatomic, strong) NSString *genre;
@property (nonatomic, strong) NSString *slogan;

@end
12 changes: 10 additions & 2 deletions Film.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@
@implementation Film

+ (NSDictionary *)JSONKeyPathsByPropertyKey {
return @{ @"name" : @"nameRU",
return @{ @"ID" : @"id",
@"name" : @"nameRU",
@"imageURL" : @"posterURL",
@"premiereDate" : @"premiereRU" };
@"premiereDate" : @"premiereRU",
@"rating" : @"ratingData.rating",
@"country" : @"country",
@"filmLength" : @"filmLength",
@"ratingMPAA" : @"ratingMPAA",
@"filmDescription" : @"description",
@"genre" : @"genre",
@"slogan" : @"slogan" };
}

+ (NSValueTransformer *)premiereDateJSONTransformer {
Expand Down
76 changes: 50 additions & 26 deletions Lesson20.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
objects = {

/* Begin PBXBuildFile section */
23DC247C1D0EB001007E8B94 /* HintForTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23DC247B1D0EB001007E8B94 /* HintForTableViewController.m */; };
23DC247F1D0EB13D007E8B94 /* HintForTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23DC247E1D0EB13D007E8B94 /* HintForTableView.m */; };
23DC24821D0ED3A3007E8B94 /* HintViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 23DC24811D0ED3A3007E8B94 /* HintViewController.m */; };
23DC24851D0ED569007E8B94 /* HintView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23DC24841D0ED569007E8B94 /* HintView.m */; };
AA2557D71CD0FF3A0085836C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2557D61CD0FF3A0085836C /* main.m */; };
AA2557DA1CD0FF3A0085836C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2557D91CD0FF3A0085836C /* AppDelegate.m */; };
AA2557DD1CD0FF3A0085836C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2557DC1CD0FF3A0085836C /* ViewController.m */; };
Expand All @@ -18,12 +22,20 @@
AA2557F51CD106AB0085836C /* FilmsTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2557F31CD106AB0085836C /* FilmsTableViewCell.m */; };
AA2557F61CD106AB0085836C /* FilmsTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = AA2557F41CD106AB0085836C /* FilmsTableViewCell.xib */; };
AA2557F91CD10A750085836C /* Film.m in Sources */ = {isa = PBXBuildFile; fileRef = AA2557F81CD10A750085836C /* Film.m */; };
E928E344D3A24C7C6783E040 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9714A66A325A9BD59BEC7260 /* libPods.a */; };
CCFB3886B4F4360BE8F1AF50 /* libPods-Lesson20.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E7C3DBE12049E2FC1E846B2 /* libPods-Lesson20.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
53CD6597CE7DBEE54F5C7F13 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
9714A66A325A9BD59BEC7260 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
1E7C3DBE12049E2FC1E846B2 /* libPods-Lesson20.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Lesson20.a"; sourceTree = BUILT_PRODUCTS_DIR; };
23DC247A1D0EB001007E8B94 /* HintForTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HintForTableViewController.h; sourceTree = "<group>"; };
23DC247B1D0EB001007E8B94 /* HintForTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HintForTableViewController.m; sourceTree = "<group>"; };
23DC247D1D0EB13D007E8B94 /* HintForTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HintForTableView.h; sourceTree = "<group>"; };
23DC247E1D0EB13D007E8B94 /* HintForTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HintForTableView.m; sourceTree = "<group>"; };
23DC24801D0ED3A3007E8B94 /* HintViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HintViewController.h; sourceTree = "<group>"; };
23DC24811D0ED3A3007E8B94 /* HintViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HintViewController.m; sourceTree = "<group>"; };
23DC24831D0ED569007E8B94 /* HintView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HintView.h; sourceTree = "<group>"; };
23DC24841D0ED569007E8B94 /* HintView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HintView.m; sourceTree = "<group>"; };
3BDCB65A70E7C9819517DDC0 /* Pods-Lesson20.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Lesson20.release.xcconfig"; path = "Pods/Target Support Files/Pods-Lesson20/Pods-Lesson20.release.xcconfig"; sourceTree = "<group>"; };
AA2557D21CD0FF3A0085836C /* Lesson20.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Lesson20.app; sourceTree = BUILT_PRODUCTS_DIR; };
AA2557D61CD0FF3A0085836C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
AA2557D81CD0FF3A0085836C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
Expand All @@ -43,34 +55,34 @@
AA2557F41CD106AB0085836C /* FilmsTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FilmsTableViewCell.xib; sourceTree = "<group>"; };
AA2557F71CD10A750085836C /* Film.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Film.h; path = ../Film.h; sourceTree = "<group>"; };
AA2557F81CD10A750085836C /* Film.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Film.m; path = ../Film.m; sourceTree = "<group>"; };
C1F34E95972618A100292669 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
ED411FA70849A23A02DED167 /* Pods-Lesson20.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Lesson20.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Lesson20/Pods-Lesson20.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
AA2557CF1CD0FF3A0085836C /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E928E344D3A24C7C6783E040 /* libPods.a in Frameworks */,
CCFB3886B4F4360BE8F1AF50 /* libPods-Lesson20.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1464E63E6AEE28BCBFB67086 /* Frameworks */ = {
01A51946582338788C22779A /* Frameworks */ = {
isa = PBXGroup;
children = (
9714A66A325A9BD59BEC7260 /* libPods.a */,
1E7C3DBE12049E2FC1E846B2 /* libPods-Lesson20.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
5A4F0337AFC3DADBB5CD3C5E /* Pods */ = {
10BAA2C200D556298982DE3C /* Pods */ = {
isa = PBXGroup;
children = (
C1F34E95972618A100292669 /* Pods.debug.xcconfig */,
53CD6597CE7DBEE54F5C7F13 /* Pods.release.xcconfig */,
ED411FA70849A23A02DED167 /* Pods-Lesson20.debug.xcconfig */,
3BDCB65A70E7C9819517DDC0 /* Pods-Lesson20.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
Expand All @@ -80,8 +92,8 @@
children = (
AA2557D41CD0FF3A0085836C /* Lesson20 */,
AA2557D31CD0FF3A0085836C /* Products */,
5A4F0337AFC3DADBB5CD3C5E /* Pods */,
1464E63E6AEE28BCBFB67086 /* Frameworks */,
10BAA2C200D556298982DE3C /* Pods */,
01A51946582338788C22779A /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -114,6 +126,14 @@
AA2557F21CD106AB0085836C /* FilmsTableViewCell.h */,
AA2557F31CD106AB0085836C /* FilmsTableViewCell.m */,
AA2557F41CD106AB0085836C /* FilmsTableViewCell.xib */,
23DC247A1D0EB001007E8B94 /* HintForTableViewController.h */,
23DC247B1D0EB001007E8B94 /* HintForTableViewController.m */,
23DC247D1D0EB13D007E8B94 /* HintForTableView.h */,
23DC247E1D0EB13D007E8B94 /* HintForTableView.m */,
23DC24801D0ED3A3007E8B94 /* HintViewController.h */,
23DC24811D0ED3A3007E8B94 /* HintViewController.m */,
23DC24831D0ED569007E8B94 /* HintView.h */,
23DC24841D0ED569007E8B94 /* HintView.m */,
);
path = Lesson20;
sourceTree = "<group>";
Expand All @@ -133,12 +153,12 @@
isa = PBXNativeTarget;
buildConfigurationList = AA2557E91CD0FF3A0085836C /* Build configuration list for PBXNativeTarget "Lesson20" */;
buildPhases = (
35185BF72085ED99F77833F9 /* Check Pods Manifest.lock */,
5C81BD7F077D58AF60E5E43D /* 📦 Check Pods Manifest.lock */,
AA2557CE1CD0FF3A0085836C /* Sources */,
AA2557CF1CD0FF3A0085836C /* Frameworks */,
AA2557D01CD0FF3A0085836C /* Resources */,
FCAF9372F095E6DA4EB5F759 /* Embed Pods Frameworks */,
1E1A3090F60603283FD73924 /* Copy Pods Resources */,
3A57390F323E77899FB0E44D /* 📦 Embed Pods Frameworks */,
3F50709B3D600CF7B06A7FF9 /* 📦 Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -196,49 +216,49 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
1E1A3090F60603283FD73924 /* Copy Pods Resources */ = {
3A57390F323E77899FB0E44D /* 📦 Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
name = "📦 Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Lesson20/Pods-Lesson20-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
35185BF72085ED99F77833F9 /* Check Pods Manifest.lock */ = {
3F50709B3D600CF7B06A7FF9 /* 📦 Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
name = "📦 Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Lesson20/Pods-Lesson20-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FCAF9372F095E6DA4EB5F759 /* Embed Pods Frameworks */ = {
5C81BD7F077D58AF60E5E43D /* 📦 Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
name = "📦 Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand All @@ -249,12 +269,16 @@
buildActionMask = 2147483647;
files = (
AA2557DD1CD0FF3A0085836C /* ViewController.m in Sources */,
23DC247F1D0EB13D007E8B94 /* HintForTableView.m in Sources */,
23DC247C1D0EB001007E8B94 /* HintForTableViewController.m in Sources */,
AA2557F51CD106AB0085836C /* FilmsTableViewCell.m in Sources */,
AA2557F11CD102B80085836C /* NetManager.m in Sources */,
23DC24821D0ED3A3007E8B94 /* HintViewController.m in Sources */,
AA2557DA1CD0FF3A0085836C /* AppDelegate.m in Sources */,
AA2557D71CD0FF3A0085836C /* main.m in Sources */,
AA2557EE1CD101260085836C /* DetailViewController.m in Sources */,
AA2557F91CD10A750085836C /* Film.m in Sources */,
23DC24851D0ED569007E8B94 /* HintView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -366,7 +390,7 @@
};
AA2557EA1CD0FF3A0085836C /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = C1F34E95972618A100292669 /* Pods.debug.xcconfig */;
baseConfigurationReference = ED411FA70849A23A02DED167 /* Pods-Lesson20.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Lesson20/Info.plist;
Expand All @@ -379,7 +403,7 @@
};
AA2557EB1CD0FF3A0085836C /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 53CD6597CE7DBEE54F5C7F13 /* Pods.release.xcconfig */;
baseConfigurationReference = 3BDCB65A70E7C9819517DDC0 /* Pods-Lesson20.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = Lesson20/Info.plist;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AA2557D11CD0FF3A0085836C"
BuildableName = "Lesson20.app"
BlueprintName = "Lesson20"
ReferencedContainer = "container:Lesson20.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AA2557D11CD0FF3A0085836C"
BuildableName = "Lesson20.app"
BlueprintName = "Lesson20"
ReferencedContainer = "container:Lesson20.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AA2557D11CD0FF3A0085836C"
BuildableName = "Lesson20.app"
BlueprintName = "Lesson20"
ReferencedContainer = "container:Lesson20.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "AA2557D11CD0FF3A0085836C"
BuildableName = "Lesson20.app"
BlueprintName = "Lesson20"
ReferencedContainer = "container:Lesson20.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>Lesson20.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>4</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>AA2557D11CD0FF3A0085836C</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
<BreakpointContent
shouldBeEnabled = "Yes"
ignoreCount = "0"
continueAfterRunningActions = "No"
scope = "0"
stopOnStyle = "0">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
5 changes: 5 additions & 0 deletions Lesson20/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
Expand Down
Loading