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
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/MovieQuiz-ios.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions MovieQuiz.xcodeproj/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions MovieQuiz.xcodeproj/.idea/MovieQuiz.xcodeproj.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions MovieQuiz.xcodeproj/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions MovieQuiz.xcodeproj/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions MovieQuiz.xcodeproj/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions MovieQuiz.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
AD5EE5DE284D7887003966EF /* UIColor+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD5EE5DD284D7887003966EF /* UIColor+Extensions.swift */; };
AD77F5742857F8810062FB14 /* Date+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD77F5732857F8810062FB14 /* Date+Extensions.swift */; };
AD7AFA552836189F00399704 /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD7AFA542836189F00399704 /* Array+Extensions.swift */; };
B8B15C472B38C706000BBF36 /* YS Display-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B8B15C452B38C705000BBF36 /* YS Display-Bold.ttf */; };
B8B15C482B38C706000BBF36 /* YS Display-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = B8B15C462B38C706000BBF36 /* YS Display-Medium.ttf */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -30,6 +32,8 @@
AD5EE5DD284D7887003966EF /* UIColor+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Extensions.swift"; sourceTree = "<group>"; };
AD77F5732857F8810062FB14 /* Date+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Date+Extensions.swift"; sourceTree = "<group>"; };
AD7AFA542836189F00399704 /* Array+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extensions.swift"; sourceTree = "<group>"; };
B8B15C452B38C705000BBF36 /* YS Display-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "YS Display-Bold.ttf"; sourceTree = "<group>"; };
B8B15C462B38C706000BBF36 /* YS Display-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "YS Display-Medium.ttf"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -56,6 +60,8 @@
isa = PBXGroup;
children = (
AD1ABABC2831907F00B3E448 /* LaunchScreen.storyboard */,
B8B15C452B38C705000BBF36 /* YS Display-Bold.ttf */,
B8B15C462B38C706000BBF36 /* YS Display-Medium.ttf */,
AD1ABABA2831907F00B3E448 /* Assets.xcassets */,
AD1ABABF2831907F00B3E448 /* Info.plist */,
);
Expand Down Expand Up @@ -162,6 +168,8 @@
AD1ABABE2831907F00B3E448 /* LaunchScreen.storyboard in Resources */,
AD1ABABB2831907F00B3E448 /* Assets.xcassets in Resources */,
AD1ABAB92831907B00B3E448 /* Main.storyboard in Resources */,
B8B15C472B38C706000BBF36 /* YS Display-Bold.ttf in Resources */,
B8B15C482B38C706000BBF36 /* YS Display-Medium.ttf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
9 changes: 8 additions & 1 deletion MovieQuiz/Helpers/UIColor+Extensions.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import UIKit

extension UIColor { }
extension UIColor {
static var ypGreen: UIColor { UIColor(named: "YP Green") ?? UIColor.green }
static var ypRed: UIColor { UIColor(named: "YP Red") ?? UIColor.red }
static var ypBlack: UIColor { UIColor(named: "YP Black") ?? UIColor.black}
static var ypBackground: UIColor { UIColor(named: "YP Background") ?? UIColor.darkGray }
static var ypGray: UIColor { UIColor(named: "YP Gray") ?? UIColor.gray }
static var ypWhite: UIColor { UIColor(named: "YP White") ?? UIColor.white}
}
133 changes: 130 additions & 3 deletions MovieQuiz/Presentation/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="dark"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<customFonts key="customFonts">
<array key="YS Display-Bold.ttf">
<string>YSDisplay-Bold</string>
</array>
<array key="YS Display-Medium.ttf">
<string>YSDisplay-Medium</string>
</array>
</customFonts>
<scenes>
<!--Movie Quiz View Controller-->
<scene sceneID="tne-QT-ifu">
Expand All @@ -15,13 +24,131 @@
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="XLA-nG-DFD">
<rect key="frame" x="20" y="58" width="374" height="804"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2Ua-Me-9mI">
<rect key="frame" x="0.0" y="0.0" width="374" height="27"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" text="Вопрос" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="CC8-Wy-c8N" userLabel="Question Title Label">
<rect key="frame" x="0.0" y="0.0" width="331" height="27"/>
<fontDescription key="fontDescription" name="YSDisplay-Bold" family="YS Display" pointSize="23"/>
<color key="textColor" name="YP White"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="1/10" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="C2a-Tx-q9U" userLabel="Index Label">
<rect key="frame" x="331" y="0.0" width="43" height="27"/>
<fontDescription key="fontDescription" name="YSDisplay-Bold" family="YS Display" pointSize="23"/>
<color key="textColor" name="YP White"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="dfn-PI-wvs" userLabel="Preview Image">
<rect key="frame" x="85.5" y="47" width="203" height="304.5"/>
<color key="backgroundColor" name="YP White"/>
<constraints>
<constraint firstAttribute="width" secondItem="dfn-PI-wvs" secondAttribute="height" multiplier="2:3" id="DgU-xV-YKt"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Рейтинг этого фильма меньше, чем 5?" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n7A-5r-Vgz" userLabel="Question Label">
<rect key="frame" x="16.5" y="371.5" width="341" height="352.5"/>
<fontDescription key="fontDescription" name="YSDisplay-Bold" family="YS Display" pointSize="23"/>
<color key="textColor" name="YP White"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" distribution="fillEqually" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="zoo-O4-Iux">
<rect key="frame" x="0.0" y="744" width="374" height="60"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="MBb-QK-XMa" userLabel="Nobutton">
<rect key="frame" x="0.0" y="0.0" width="177" height="60"/>
<color key="backgroundColor" name="YP White"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="nTI-Qx-Si7"/>
</constraints>
<fontDescription key="fontDescription" name="YSDisplay-Medium" family="YS Display" pointSize="20"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Нет">
<color key="titleColor" name="YP Black"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="noButtonClicked:" destination="BYZ-38-t0r" eventType="touchUpInside" id="48X-xK-MY3"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ujf-pM-bPT" userLabel="yes button">
<rect key="frame" x="197" y="0.0" width="177" height="60"/>
<color key="backgroundColor" name="YP White"/>
<constraints>
<constraint firstAttribute="height" constant="60" id="jfO-Y5-YGJ"/>
</constraints>
<fontDescription key="fontDescription" name="YSDisplay-Medium" family="YS Display" pointSize="18"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="Да">
<color key="titleColor" name="YP Black"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<action selector="yesButtonClicked:" destination="BYZ-38-t0r" eventType="touchUpInside" id="Wuv-ao-JfH"/>
</connections>
</button>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<color key="backgroundColor" name="YP Black"/>
<constraints>
<constraint firstItem="XLA-nG-DFD" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="10" id="Cg5-Ty-wsY"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="XLA-nG-DFD" secondAttribute="bottom" id="JBh-B4-vti"/>
<constraint firstItem="CC8-Wy-c8N" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="20" id="RIe-kL-BwL"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="XLA-nG-DFD" secondAttribute="trailing" constant="20" id="UCP-BU-JmM"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="trailing" secondItem="ujf-pM-bPT" secondAttribute="trailing" constant="20" id="bZO-f3-Q0U"/>
<constraint firstItem="6Tk-OE-BBY" firstAttribute="bottom" secondItem="zoo-O4-Iux" secondAttribute="bottom" id="hPy-Dg-ge1"/>
<constraint firstItem="XLA-nG-DFD" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="20" id="ngi-z1-oIk"/>
<constraint firstItem="MBb-QK-XMa" firstAttribute="leading" secondItem="6Tk-OE-BBY" secondAttribute="leading" constant="20" id="wrC-FW-YIn"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="15"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</view>
<connections>
<outlet property="imageView" destination="dfn-PI-wvs" id="kL9-24-Qoa"/>
<outlet property="indexLabel" destination="C2a-Tx-q9U" id="uCc-gf-Y7n"/>
<outlet property="noButton" destination="MBb-QK-XMa" id="mgF-ax-led"/>
<outlet property="questionLabel" destination="n7A-5r-Vgz" id="sI0-9a-o4b"/>
<outlet property="questionTitleLabel" destination="CC8-Wy-c8N" id="xmb-Zx-huh"/>
<outlet property="yesButton" destination="ujf-pM-bPT" id="okr-ov-LyZ"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-55.072463768115945" y="55.580357142857139"/>
</scene>
</scenes>
<resources>
<namedColor name="YP Black">
<color red="0.10199999809265137" green="0.10599999874830246" blue="0.13300000131130219" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="YP White">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
Loading