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
13 changes: 9 additions & 4 deletions SwiftVIPER.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 50;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -270,8 +270,9 @@
4A5B56AF2195E0E4005082B8 /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastSwiftUpdateCheck = 1000;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1630;
ORGANIZATIONNAME = "Tsubasa Hayashi";
TargetAttributes = {
4A5B56B62195E0E4005082B8 = {
Expand Down Expand Up @@ -418,6 +419,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -429,6 +431,7 @@
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
Expand Down Expand Up @@ -479,6 +482,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand All @@ -490,6 +494,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
Expand All @@ -514,6 +519,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "$(SRCROOT)/SwiftVIPER/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -531,6 +537,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = "$(SRCROOT)/SwiftVIPER/Resources/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -545,7 +552,6 @@
4A5B56D82195E0E5005082B8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = SwiftVIPERTests/Info.plist;
Expand All @@ -565,7 +571,6 @@
4A5B56D92195E0E5005082B8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = SwiftVIPERTests/Info.plist;
Expand Down
10 changes: 9 additions & 1 deletion SwiftVIPER/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,15 @@ class AppDelegate: UIResponder, UIApplicationDelegate {


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
let navBarAppearance = UINavigationBar.appearance()
navBarAppearance.barTintColor = .gray
navBarAppearance.backgroundColor = .gray
navBarAppearance.isTranslucent = false
navBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
navBarAppearance.tintColor = .white

window?.overrideUserInterfaceStyle = .dark

return true
}

Expand Down
45 changes: 33 additions & 12 deletions SwiftVIPER/Resources/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="jWb-nM-1iI">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="23727" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="jWb-nM-1iI">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23721"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
Expand All @@ -17,18 +17,30 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="C8b-9Z-ZIt">
<rect key="frame" x="120.5" y="325.5" width="134" height="80"/>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="29" translatesAutoresizingMaskIntoConstraints="NO" id="C8b-9Z-ZIt">
<rect key="frame" x="102.5" y="306" width="170" height="119"/>
<subviews>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vvD-3r-hbT">
<rect key="frame" x="0.0" y="0.0" width="134" height="30"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vvD-3r-hbT">
<rect key="frame" x="0.0" y="0.0" width="170" height="45"/>
<color key="backgroundColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="height" constant="45" id="EfX-C2-xJq"/>
<constraint firstAttribute="width" constant="170" id="s21-9r-2R0"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Push List Screen"/>
<connections>
<action selector="pushListScreenAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="atE-xw-d9P"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ODy-xs-OP5">
<rect key="frame" x="0.0" y="50" width="134" height="30"/>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ODy-xs-OP5">
<rect key="frame" x="0.0" y="74" width="170" height="45"/>
<color key="backgroundColor" systemColor="systemBlueColor"/>
<constraints>
<constraint firstAttribute="width" constant="170" id="eHD-Ru-zot"/>
<constraint firstAttribute="height" constant="45" id="exa-RQ-Hfb"/>
</constraints>
<color key="tintColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<state key="normal" title="Present List Screen"/>
<connections>
<action selector="presentListScreenAction:" destination="BYZ-38-t0r" eventType="touchUpInside" id="E3d-27-PmK"/>
Expand All @@ -37,14 +49,18 @@
</subviews>
</stackView>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="C8b-9Z-ZIt" firstAttribute="centerY" secondItem="6Tk-OE-BBY" secondAttribute="centerY" id="Js1-R6-8Dy"/>
<constraint firstItem="C8b-9Z-ZIt" firstAttribute="centerX" secondItem="6Tk-OE-BBY" secondAttribute="centerX" id="gQ2-m2-O2J"/>
</constraints>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
</view>
<navigationItem key="navigationItem" id="MBM-4T-bHu"/>
<connections>
<outlet property="presentListScreenBtn" destination="ODy-xs-OP5" id="tSF-qs-egS"/>
<outlet property="pushListScreenBtn" destination="vvD-3r-hbT" id="knz-HY-zKf"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
Expand All @@ -69,4 +85,9 @@
<point key="canvasLocation" x="185" y="133"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBlueColor">
<color red="0.0" green="0.47843137254901963" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources>
</document>
39 changes: 39 additions & 0 deletions SwiftVIPER/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,36 @@
import UIKit

final class ViewController: UIViewController {


@IBOutlet weak var pushListScreenBtn: UIButton!
@IBOutlet weak var presentListScreenBtn: UIButton!

override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
navigationController?.setNavigationBarHidden(false, animated: false)
navigationController?.navigationBar.prefersLargeTitles = false

if navigationItem.titleView == nil {
let titleLabel = UILabel()
titleLabel.text = "SwiftVIPER"
titleLabel.font = UIFont.systemFont(ofSize: 20, weight: .semibold)
titleLabel.textColor = .white
titleLabel.textAlignment = .center
titleLabel.adjustsFontSizeToFitWidth = true
titleLabel.accessibilityTraits = .header
titleLabel.sizeToFit()

navigationItem.titleView = titleLabel
}

configureUI()
}

override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
navigationController?.setNavigationBarHidden(false, animated: false)
}

@IBAction func pushListScreenAction(_ sender: Any) {
ListRouterInput().push(from: self, entryEntity: ListEntryEntity(language: "Swift"))
Expand All @@ -17,6 +47,15 @@ final class ViewController: UIViewController {
@IBAction func presentListScreenAction(_ sender: Any) {
ListRouterInput().present(from: self, entryEntity: ListEntryEntity(language: "Swift"))
}

private func configureUI() {
let buttons = [pushListScreenBtn, presentListScreenBtn]

for button in buttons {
button?.layer.cornerRadius = 8
button?.clipsToBounds = true
}
}

}

Expand Down