Skip to content

Commit

Permalink
Xcode 10 / Swift 4.2, new watch complications on watchOS, macOS Mojav…
Browse files Browse the repository at this point in the history
…e dark mode support
  • Loading branch information
ptsochantaris committed Sep 16, 2018
1 parent 9e61ed3 commit 18e3690
Show file tree
Hide file tree
Showing 58 changed files with 416 additions and 291 deletions.
4 changes: 2 additions & 2 deletions PocketTrailer Today Extension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.6.10</string>
<string>1.6.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1476</string>
<string>1477</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>
Expand Down
42 changes: 21 additions & 21 deletions PocketTrailer Today Extension/TodayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,42 +11,42 @@ final class TodayViewController: UIViewController, NCWidgetProviding {
@IBOutlet private weak var prImage: UIImageView!
@IBOutlet private weak var issueImage: UIImageView!

private var linkButton = UIButton(type: UIButtonType.custom)
private var linkButton = UIButton(type: .custom)
private let paragraph = NSMutableParagraphStyle()

private var titleAttributes: [NSAttributedStringKey : Any] {
private var titleAttributes: [NSAttributedString.Key : Any] {
return [
NSAttributedStringKey.foregroundColor: UIColor.black,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedStringKey.paragraphStyle: paragraph ]
NSAttributedString.Key.foregroundColor: UIColor.black,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedString.Key.paragraphStyle: paragraph ]
}

private var normalAttributes: [NSAttributedStringKey : Any] {
private var normalAttributes: [NSAttributedString.Key : Any] {
return [
NSAttributedStringKey.foregroundColor: UIColor.darkGray,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedStringKey.paragraphStyle: paragraph ]
NSAttributedString.Key.foregroundColor: UIColor.darkGray,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedString.Key.paragraphStyle: paragraph ]
}

private var dimAttributes: [NSAttributedStringKey : Any] {
private var dimAttributes: [NSAttributedString.Key : Any] {
return [
NSAttributedStringKey.foregroundColor: UIColor.gray,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedStringKey.paragraphStyle: paragraph ]
NSAttributedString.Key.foregroundColor: UIColor.gray,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedString.Key.paragraphStyle: paragraph ]
}

private var redAttributes: [NSAttributedStringKey : Any] {
private var redAttributes: [NSAttributedString.Key : Any] {
return [
NSAttributedStringKey.foregroundColor: UIColor.red,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedStringKey.paragraphStyle: paragraph ]
NSAttributedString.Key.foregroundColor: UIColor.red,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: UIFont.systemFontSize+2.0),
NSAttributedString.Key.paragraphStyle: paragraph ]
}

private var smallAttributes: [NSAttributedStringKey : Any] {
private var smallAttributes: [NSAttributedString.Key : Any] {
return [
NSAttributedStringKey.foregroundColor: UIColor.gray,
NSAttributedStringKey.font: UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
NSAttributedStringKey.paragraphStyle: paragraph ]
NSAttributedString.Key.foregroundColor: UIColor.gray,
NSAttributedString.Key.font: UIFont.systemFont(ofSize: UIFont.smallSystemFontSize),
NSAttributedString.Key.paragraphStyle: paragraph ]
}

override func viewDidLoad() {
Expand Down
40 changes: 17 additions & 23 deletions PocketTrailer WatchKit App/Base.lproj/Interface.storyboard
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="13196" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
<document type="com.apple.InterfaceBuilder.WatchKit.Storyboard" version="3.0" toolsVersion="14313.18" targetRuntime="watchKit" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="AgC-eL-Hgc">
<device id="watch38" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="watchOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13174"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="13051"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBWatchKitPlugin" version="14238.10"/>
</dependencies>
<scenes>
<!--Summary-->
<scene sceneID="aou-V4-d1y">
<objects>
<controller identifier="SectionController" title="Summary" hidesWhenLoading="NO" id="AgC-eL-Hgc" customClass="SectionController" customModule="Trailer">
<controller identifier="SectionController" title="Summary" hidesWhenLoading="NO" id="AgC-eL-Hgc" customClass="SectionController" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<items>
<label alignment="center" verticalAlignment="center" text="Connecting" textAlignment="center" numberOfLines="0" id="tZx-Xo-NwI">
<fontDescription key="font" style="UICTFontTextStyleFootnote"/>
</label>
<group width="1" alignment="left" spacing="0.0" id="7zW-K7-f5C">
<items>
<table alignment="center" verticalAlignment="center" id="be2-ie-h5R">
<table alignment="center" verticalAlignment="center" spacing="1" id="be2-ie-h5R">
<items>
<tableRow identifier="SummaryRow" selectable="NO" id="fCa-r2-hfH" customClass="SummaryRow" customModule="Trailer">
<tableRow identifier="SummaryRow" selectable="NO" id="fCa-r2-hfH" customClass="SummaryRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" layout="vertical" spacing="3" id="iie-Cd-7sI">
<items>
<group alignment="center" layout="vertical" spacing="2" id="PyO-Jg-DTM">
Expand Down Expand Up @@ -168,7 +168,7 @@
<outlet property="unreadGroup" destination="S87-7f-wLK" id="ywP-Fe-7FR"/>
</connections>
</tableRow>
<tableRow identifier="TitleRow" selectable="NO" id="tHv-Jj-a9y" customClass="TitleRow" customModule="Trailer">
<tableRow identifier="TitleRow" selectable="NO" id="tHv-Jj-a9y" customClass="TitleRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" id="mWo-dt-dzr">
<items>
<group alignment="center" radius="4" id="Kau-36-YJy">
Expand All @@ -189,31 +189,25 @@
<outlet property="titleL" destination="dy2-9S-MJp" id="mX0-PC-TAL"/>
</connections>
</tableRow>
<tableRow identifier="SectionRow" id="ql1-oS-xZe" customClass="SectionRow" customModule="Trailer">
<tableRow identifier="SectionRow" id="ql1-oS-xZe" customClass="SectionRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" id="Uft-cP-lJ6">
<items>
<label alignment="left" verticalAlignment="center" text="Section" id="m26-4w-XIn">
<fontDescription key="font" style="UICTFontTextStyleTitle1"/>
<variation key="device=watch38mm">
<fontDescription key="font" style="UICTFontTextStyleTitle3"/>
</variation>
<fontDescription key="font" style="UICTFontTextStyleCaption2"/>
</label>
<group height="1" alignment="right" verticalAlignment="center" radius="8" id="VK1-qB-Emf">
<items>
<label alignment="center" verticalAlignment="center" text=" 1" id="YSb-rO-7SF">
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="font" style="UICTFontTextStyleTitle1"/>
<variation key="device=watch38mm">
<fontDescription key="font" style="UICTFontTextStyleTitle3"/>
</variation>
<fontDescription key="font" style="UICTFontTextStyleCaption2"/>
</label>
</items>
<color key="backgroundColor" red="1" green="0.0" blue="0.070606581870000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<edgeInsets key="margins" left="6" right="6" top="0.0" bottom="0.0"/>
</group>
</items>
<color key="backgroundColor" red="0.14906298667075868" green="0.17628376882150001" blue="0.24334574854651159" alpha="1" colorSpace="calibratedRGB"/>
<edgeInsets key="margins" left="5" right="3" top="9" bottom="9"/>
<edgeInsets key="margins" left="10" right="7" top="9" bottom="9"/>
</group>
<connections>
<outlet property="countHolder" destination="VK1-qB-Emf" id="ghB-It-VlJ"/>
Expand Down Expand Up @@ -263,14 +257,14 @@
<!--ListController-->
<scene sceneID="ox7-bJ-gA7">
<objects>
<controller identifier="ListController" hidesWhenLoading="NO" id="Sqe-dw-Y9B" customClass="PRListController" customModule="Trailer">
<controller identifier="ListController" hidesWhenLoading="NO" id="Sqe-dw-Y9B" customClass="PRListController" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<items>
<label alignment="center" verticalAlignment="center" text="Connecting" textAlignment="center" numberOfLines="0" id="2Zp-yv-wv1">
<fontDescription key="font" style="UICTFontTextStyleFootnote"/>
</label>
<table alignment="left" id="XeC-bN-XlT">
<items>
<tableRow identifier="PRRow" id="qcu-Df-oql" customClass="PRRow" customModule="Trailer">
<tableRow identifier="PRRow" id="qcu-Df-oql" customClass="PRRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" layout="vertical" radius="2" id="Uwj-Y1-PON">
<items>
<group width="1" alignment="left" id="M7T-K5-ngQ">
Expand Down Expand Up @@ -356,14 +350,14 @@
<!--DetailController-->
<scene sceneID="Y5a-NZ-okm">
<objects>
<controller identifier="DetailController" hidesWhenLoading="NO" id="Hgm-oe-oa5" customClass="PRDetailController" customModule="Trailer">
<controller identifier="DetailController" hidesWhenLoading="NO" id="Hgm-oe-oa5" customClass="PRDetailController" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<items>
<label alignment="center" verticalAlignment="center" text="Connecting" textAlignment="center" numberOfLines="0" id="Adx-ov-WlP">
<fontDescription key="font" style="UICTFontTextStyleFootnote"/>
</label>
<table alignment="left" hidden="YES" id="nDu-Js-IyV">
<items>
<tableRow identifier="StatusRow" selectable="NO" id="O5R-Ty-nOY" customClass="StatusRow" customModule="Trailer">
<tableRow identifier="StatusRow" selectable="NO" id="O5R-Ty-nOY" customClass="StatusRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" spacing="3" id="gDg-ep-B9d">
<items>
<group width="2" height="1" heightAdjustment="-4" alignment="left" verticalAlignment="center" radius="1" id="K7J-4q-5nn">
Expand All @@ -380,7 +374,7 @@
<outlet property="margin" destination="K7J-4q-5nn" id="yFk-vo-uir"/>
</connections>
</tableRow>
<tableRow identifier="LabelRow" selectable="NO" id="IWp-rT-BP5" customClass="LabelRow" customModule="Trailer">
<tableRow identifier="LabelRow" selectable="NO" id="IWp-rT-BP5" customClass="LabelRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" spacing="3" id="lVf-k4-WHR">
<items>
<label width="1" alignment="left" text="Description" numberOfLines="0" id="htJ-iu-xQa">
Expand All @@ -394,7 +388,7 @@
<outlet property="labelL" destination="htJ-iu-xQa" id="vAb-Bg-wc1"/>
</connections>
</tableRow>
<tableRow identifier="CommentRow" id="7vR-Gf-9Vf" customClass="CommentRow" customModule="Trailer">
<tableRow identifier="CommentRow" id="7vR-Gf-9Vf" customClass="CommentRow" customModule="PocketTrailer_WatchKit_App" customModuleProvider="target">
<group key="rootItem" width="1" height="0.0" alignment="left" spacing="3" id="WCb-Rn-fOj">
<items>
<group width="2" height="1" heightAdjustment="-4" alignment="left" verticalAlignment="center" radius="1" id="qDh-AS-kOq">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,16 @@
"idiom" : "watch",
"filename" : "TrailerWatch44@2x.png",
"scale" : "2x",
"role" : "longLook",
"subtype" : "42mm"
"role" : "appLauncher",
"subtype" : "40mm"
},
{
"size" : "50x50",
"idiom" : "watch",
"filename" : "watch100.png",
"scale" : "2x",
"role" : "appLauncher",
"subtype" : "44mm"
},
{
"size" : "86x86",
Expand All @@ -62,6 +70,14 @@
"role" : "quickLook",
"subtype" : "42mm"
},
{
"size" : "108x108",
"idiom" : "watch",
"filename" : "watch216.png",
"scale" : "2x",
"role" : "quickLook",
"subtype" : "44mm"
},
{
"size" : "1024x1024",
"idiom" : "watch-marketing",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions PocketTrailer WatchKit App/Images.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
"idiom" : "watch",
"filename" : "GlanceIssues.png",
"scale" : "2x"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@
"idiom" : "watch",
"filename" : "GlacePrs.png",
"scale" : "2x"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : "<=145"
},
{
"idiom" : "watch",
"scale" : "2x",
"screen-width" : ">145"
}
],
"info" : {
Expand Down
4 changes: 2 additions & 2 deletions PocketTrailer WatchKit App/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.6.10</string>
<string>1.6.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1476</string>
<string>1477</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
Expand Down
Loading

0 comments on commit 18e3690

Please sign in to comment.