Skip to content

Commit

Permalink
MergeMerged master, add split view support
Browse files Browse the repository at this point in the history
  • Loading branch information
subdigital committed Feb 25, 2017
2 parents 87d980c + 14e4679 commit 9cb2e12
Show file tree
Hide file tree
Showing 45 changed files with 2,902 additions and 612 deletions.
6 changes: 5 additions & 1 deletion FiveCalls/FiveCalls.xcodeproj/project.pbxproj
Expand Up @@ -72,6 +72,7 @@
B5E98E3B1E52A566005221B7 /* GET-report.json in Resources */ = {isa = PBXBuildFile; fileRef = B5E98E3A1E52A566005221B7 /* GET-report.json */; };
B5E98E3D1E52A570005221B7 /* GET-issues.json in Resources */ = {isa = PBXBuildFile; fileRef = B5E98E3C1E52A570005221B7 /* GET-issues.json */; };
B5E98E411E52A8AB005221B7 /* POST-report.json in Resources */ = {isa = PBXBuildFile; fileRef = B5E98E401E52A8AB005221B7 /* POST-report.json */; };
B5FFBB991E5EA60E00647121 /* Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5FFBB981E5EA60E00647121 /* Appearance.swift */; };
B875AA1AE8F7D7A6C6E3ADF8 /* AssetsLibrary.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CCD3D5810796C5E3DC6ACC46 /* AssetsLibrary.framework */; };
DC559EC377C23F84C65EA49B /* Pods-FiveCalls-metadata.plist in Resources */ = {isa = PBXBuildFile; fileRef = FADBF18C3DB1E1DEFE29B841 /* Pods-FiveCalls-metadata.plist */; };
E00C4DA8DB93E99E40E87452 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF2A740FE5EBC6A70F2AB3CA /* SystemConfiguration.framework */; };
Expand Down Expand Up @@ -186,6 +187,7 @@
B5E98E3A1E52A566005221B7 /* GET-report.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "GET-report.json"; sourceTree = "<group>"; };
B5E98E3C1E52A570005221B7 /* GET-issues.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "GET-issues.json"; sourceTree = "<group>"; };
B5E98E401E52A8AB005221B7 /* POST-report.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "POST-report.json"; sourceTree = "<group>"; };
B5FFBB981E5EA60E00647121 /* Appearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Appearance.swift; sourceTree = "<group>"; };
CCD3D5810796C5E3DC6ACC46 /* AssetsLibrary.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AssetsLibrary.framework; path = System/Library/Frameworks/AssetsLibrary.framework; sourceTree = SDKROOT; };
D08630058C5382210630DE7E /* Pods_FiveCalls.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FiveCalls.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F57BD8B31E438E4200BD554C /* RobotoCondensed-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "RobotoCondensed-Bold.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -350,6 +352,7 @@
791C9FD01E4E5E510074A8B7 /* About.storyboard */,
B52805201E3FA94D00EE832A /* Info.plist */,
B5E98E341E529E66005221B7 /* functions.swift */,
B5FFBB981E5EA60E00647121 /* Appearance.swift */,
);
path = FiveCalls;
sourceTree = "<group>";
Expand Down Expand Up @@ -737,7 +740,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "REVEAL_APP_PATH=$(mdfind kMDItemCFBundleIdentifier=\"com.ittybittyapps.Reveal2\" | head -n 1)\nBUILD_SCRIPT_PATH=\"${REVEAL_APP_PATH}/Contents/SharedSupport/Scripts/reveal_server_build_phase.sh\"\nif [ \"${REVEAL_APP_PATH}\" -a -e \"${BUILD_SCRIPT_PATH}\" ]; then\n\"${BUILD_SCRIPT_PATH}\"\nelse\necho \"Reveal Server not loaded: Cannot find a compatible Reveal app.\"\nfi\n";
shellScript = "REVEAL_APP_PATH=$(mdfind kMDItemCFBundleIdentifier=\"com.ittybittyapps.Reveal2\" | head -n 1)\nBUILD_SCRIPT_PATH=\"${REVEAL_APP_PATH}/Contents/SharedSupport/Scripts/reveal_server_build_phase.sh\"\nif [ \"${REVEAL_APP_PATH}\" -a -e \"${BUILD_SCRIPT_PATH}\" ]; then\n\"${BUILD_SCRIPT_PATH}\"\nelse\necho \"Reveal Server not loaded: Cannot find a compatible Reveal app.\"\nfi";
};
C0162342B60635266343A6AB /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
Expand Down Expand Up @@ -812,6 +815,7 @@
B502806A1E48C95700749ED7 /* BorderedButton.swift in Sources */,
F57BD8BA1E438E7600BD554C /* AppearanceProxies.swift in Sources */,
33C2E0E61E52A95900F810C6 /* UIView+FiveCalls.swift in Sources */,
B5FFBB991E5EA60E00647121 /* Appearance.swift in Sources */,
B5E762751E40E39000D63D62 /* IssuesList.swift in Sources */,
B5E762611E40470100D63D62 /* IssuesViewController.swift in Sources */,
B5CA63F81E41779300966B7D /* CheckboxView.swift in Sources */,
Expand Down
2 changes: 0 additions & 2 deletions FiveCalls/FiveCalls/AboutViewController.swift
Expand Up @@ -14,8 +14,6 @@ import Crashlytics

class AboutViewController : UITableViewController, MFMailComposeViewControllerDelegate {

// Test App id:
// static let appId = "364909474"
static let appId = "1202558609"

static let appUrl = URL(string: "https://itunes.apple.com/us/app/myapp/id\(appId)?ls=1&mt=8")
Expand Down
17 changes: 1 addition & 16 deletions FiveCalls/FiveCalls/AppDelegate.swift
Expand Up @@ -63,22 +63,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

func setAppearance() {
let pageControlAppearance = UIPageControl.appearance()
pageControlAppearance.pageIndicatorTintColor = .fvc_lightBlue
pageControlAppearance.currentPageIndicatorTintColor = .fvc_darkBlue

// Fonts
let fontDescriptor = UIFontDescriptor(fontAttributes: [
UIFontDescriptorFamilyAttribute: "Roboto Condensed"
]).withSymbolicTraits([.traitBold, .traitCondensed]) // To match the website, fonts should be Bold and Condensed

if let substituteDescriptor = fontDescriptor {
UILabel.appearance().substituteFontDescriptor = substituteDescriptor
}

UINavigationBar.appearance().titleTextAttributes =
[NSFontAttributeName: R.font.robotoCondensedBold(size: 18.0)!,
NSForegroundColorAttributeName : UIColor.white]
Appearance.instance.setup()
}

func applicationWillResignActive(_ application: UIApplication) {
Expand Down
60 changes: 60 additions & 0 deletions FiveCalls/FiveCalls/Appearance.swift
@@ -0,0 +1,60 @@
//
// Appearance.swift
// FiveCalls
//
// Created by Ben Scheirman on 2/22/17.
// Copyright © 2017 5calls. All rights reserved.
//

import UIKit

class Appearance {

static var instance = Appearance()

var fontFamily: String {
return "Roboto Condensed"
}

var fontDescriptor: UIFontDescriptor? {
return UIFontDescriptor(fontAttributes: [
UIFontDescriptorFamilyAttribute: fontFamily
]).withSymbolicTraits([.traitBold, .traitCondensed]) // To match the website, fonts should be Bold and Condensed
}

func setup() {
let pageControlAppearance = UIPageControl.appearance()
pageControlAppearance.pageIndicatorTintColor = .fvc_lightBlue
pageControlAppearance.currentPageIndicatorTintColor = .fvc_darkBlue

// Fonts

if let substituteDescriptor = fontDescriptor {
UILabel.appearance().substituteFontDescriptor = substituteDescriptor
}

UINavigationBar.appearance().titleTextAttributes =
[NSFontAttributeName: headerFont,
NSForegroundColorAttributeName : UIColor.white]
}

private func appFont(size: CGFloat, bold: Bool) -> UIFont! {
if bold {
return R.font.robotoCondensedBold(size: size)
} else {
return R.font.robotoCondensedRegular(size: size)
}
}

var headerFont: UIFont {
return appFont(size: 18, bold: true)
}

var bodyTitleFont: UIFont {
return appFont(size: 16, bold: true)
}

var bodyFont: UIFont {
return appFont(size: 16, bold: false)
}
}
22 changes: 22 additions & 0 deletions FiveCalls/FiveCalls/Assets.xcassets/refresh.imageset/Contents.json
@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "refresh@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "refresh@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 19 additions & 13 deletions FiveCalls/FiveCalls/Base.lproj/Main.storyboard
Expand Up @@ -100,6 +100,7 @@
<navigationItem key="navigationItem" id="DNh-Vj-zPa"/>
<nil key="simulatedTopBarMetrics"/>
<connections>
<outlet property="activityIndicator" destination="Ssk-NJ-Fc0" id="5mI-34-fC5"/>
<outlet property="footerView" destination="yMR-6E-6ld" id="i6B-aC-NL5"/>
<outlet property="headerContainer" destination="Jlg-f3-h08" id="etS-dw-Kub"/>
<outlet property="headerView" destination="hWw-bF-wTS" id="Y5s-Vp-Jdt"/>
Expand All @@ -123,31 +124,36 @@
<rect key="frame" x="8" y="28" width="398" height="50"/>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1uQ-iF-VA7">
<rect key="frame" x="161.66666666666666" y="82" width="91" height="32"/>
<rect key="frame" x="162" y="82" width="91" height="32"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleCallout"/>
<state key="normal" title="Set Location"/>
<connections>
<action selector="setLocationTapped:" destination="NcD-22-I7g" eventType="touchUpInside" id="5GU-vA-d2A"/>
<segue destination="vbp-Kz-LRR" kind="presentation" identifier="locationSegue" id="XV8-ty-hbB"/>
</connections>
</button>
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="Ssk-NJ-Fc0">
<rect key="frame" x="349" y="50" width="20" height="20"/>
</activityIndicatorView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="5rR-pP-thF">
<rect key="frame" x="375" y="47" width="19" height="27"/>
<rect key="frame" x="375" y="43" width="19" height="27"/>
<state key="normal" image="share"/>
</button>
</subviews>
<constraints>
<constraint firstItem="5rR-pP-thF" firstAttribute="centerY" secondItem="hWw-bF-wTS" secondAttribute="centerY" id="3O9-8C-IhR"/>
<constraint firstItem="5rR-pP-thF" firstAttribute="centerY" secondItem="hWw-bF-wTS" secondAttribute="centerY" constant="-4" id="3O9-8C-IhR"/>
<constraint firstAttribute="bottomMargin" secondItem="VW0-qD-WqW" secondAttribute="bottom" constant="34" id="Mzu-Di-ENL"/>
<constraint firstItem="1uQ-iF-VA7" firstAttribute="top" secondItem="VW0-qD-WqW" secondAttribute="bottom" constant="4" id="N24-Fz-FpH"/>
<constraint firstAttribute="trailing" secondItem="5rR-pP-thF" secondAttribute="trailing" constant="20" id="RqA-JY-eIs"/>
<constraint firstItem="Ssk-NJ-Fc0" firstAttribute="top" secondItem="VW0-qD-WqW" secondAttribute="top" constant="22" id="PNd-qb-nrO"/>
<constraint firstItem="VW0-qD-WqW" firstAttribute="trailing" secondItem="hWw-bF-wTS" secondAttribute="trailingMargin" id="TDl-je-Uop"/>
<constraint firstItem="VW0-qD-WqW" firstAttribute="leading" secondItem="hWw-bF-wTS" secondAttribute="leadingMargin" id="aC7-gX-P29"/>
<constraint firstItem="1uQ-iF-VA7" firstAttribute="centerX" secondItem="hWw-bF-wTS" secondAttribute="centerX" id="gTo-eM-EG1"/>
<constraint firstItem="0Uq-fn-96J" firstAttribute="leading" secondItem="hWw-bF-wTS" secondAttribute="leading" id="lt1-cr-n1A"/>
<constraint firstItem="VW0-qD-WqW" firstAttribute="top" secondItem="0Uq-fn-96J" secondAttribute="bottom" constant="8" id="mmi-DM-UlH"/>
<constraint firstAttribute="trailing" secondItem="0Uq-fn-96J" secondAttribute="trailing" id="v56-uQ-xre"/>
<constraint firstItem="0Uq-fn-96J" firstAttribute="top" secondItem="hWw-bF-wTS" secondAttribute="top" id="vWj-Wf-6Lj"/>
<constraint firstAttribute="trailing" secondItem="5rR-pP-thF" secondAttribute="trailing" constant="20" id="yfQ-3g-1RO"/>
<constraint firstItem="Ssk-NJ-Fc0" firstAttribute="leading" secondItem="VW0-qD-WqW" secondAttribute="trailing" constant="-57" id="zsZ-Mn-iKq"/>
</constraints>
</view>
</objects>
Expand Down Expand Up @@ -266,7 +272,7 @@
<rect key="frame" x="0.0" y="28" width="414" height="75"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="gyL-0a-wGJ" id="sKx-hn-UH9">
<rect key="frame" x="0.0" y="0.0" width="381" height="74.666666666666671"/>
<rect key="frame" x="0.0" y="0.0" width="381" height="74"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<view opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wEs-9r-J66" customClass="CheckboxView" customModule="FiveCalls" customModuleProvider="target">
Expand Down Expand Up @@ -888,21 +894,21 @@ I'm calling to express my deep opposition to the confirmation of Betsy DeVos for
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="statCell" textLabel="ZSx-yb-8Qy" detailTextLabel="RlJ-Rz-RYb" style="IBUITableViewCellStyleValue1" id="TVv-gW-ZKZ">
<rect key="frame" x="0.0" y="242.33333333333334" width="414" height="44"/>
<rect key="frame" x="0.0" y="243" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="TVv-gW-ZKZ" id="Ns2-UU-Wpo">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Made Contact" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="ZSx-yb-8Qy">
<rect key="frame" x="14.999999999999993" y="11.999999999999998" width="108.33333333333333" height="20.333333333333332"/>
<rect key="frame" x="15" y="11" width="109" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="0.0"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="2 times" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="RlJ-Rz-RYb">
<rect key="frame" x="342.66666666666669" y="11.999999999999998" width="56.333333333333336" height="20.333333333333332"/>
<rect key="frame" x="342" y="11" width="57" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="0.0"/>
<nil key="textColor"/>
Expand All @@ -912,21 +918,21 @@ I'm calling to express my deep opposition to the confirmation of Betsy DeVos for
</tableViewCellContentView>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="contactStatCell" textLabel="SJ8-g0-JAP" detailTextLabel="kbU-0d-lcn" style="IBUITableViewCellStyleValue1" id="mE9-Jg-tD4">
<rect key="frame" x="0.0" y="286.33333333333337" width="414" height="44"/>
<rect key="frame" x="0.0" y="287" width="414" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mE9-Jg-tD4" id="4mP-T1-Hr3">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.666666666666664"/>
<rect key="frame" x="0.0" y="0.0" width="414" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Made Contact" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SJ8-g0-JAP">
<rect key="frame" x="14.999999999999993" y="11.999999999999998" width="108.33333333333333" height="20.333333333333332"/>
<rect key="frame" x="15" y="11" width="109" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="0.0"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="2 times" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="kbU-0d-lcn">
<rect key="frame" x="342.66666666666669" y="11.999999999999998" width="56.333333333333336" height="20.333333333333332"/>
<rect key="frame" x="342" y="11" width="57" height="21"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="0.0"/>
<nil key="textColor"/>
Expand Down
8 changes: 7 additions & 1 deletion FiveCalls/FiveCalls/ContactCell.swift
Expand Up @@ -39,7 +39,13 @@ class ContactCell : UITableViewCell {
textLabel?.textColor = labelTextColor
detailTextLabel?.textColor = labelTextColor
}


override func prepareForReuse() {
super.prepareForReuse()
avatarImageView.currentTask?.cancel()
avatarImageView.image = nil
}

override func layoutSubviews() {
super.layoutSubviews()
avatarImageView.fvc_circleify()
Expand Down

0 comments on commit 9cb2e12

Please sign in to comment.