1.3 initial push
TODO: add support code to prevent app from crashing upon launch after update
This commit is contained in:
parent
e41a7d419b
commit
f2f85f14b5
12 changed files with 224 additions and 165 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
|
@ -613,7 +613,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||||
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
@ -621,7 +621,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock;
|
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock;
|
||||||
PRODUCT_NAME = "Nook Music";
|
PRODUCT_NAME = "Nook Music";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
@ -639,7 +639,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
CODE_SIGN_ENTITLEMENTS = grandfatherrock/grandfatherrock.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||||
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
INFOPLIST_FILE = grandfatherrock/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
|
||||||
|
@ -647,7 +647,7 @@
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock;
|
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock;
|
||||||
PRODUCT_NAME = "Nook Music";
|
PRODUCT_NAME = "Nook Music";
|
||||||
SUPPORTS_MACCATALYST = NO;
|
SUPPORTS_MACCATALYST = NO;
|
||||||
|
@ -749,7 +749,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = hssceneExtension.entitlements;
|
CODE_SIGN_ENTITLEMENTS = hssceneExtension.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||||
INFOPLIST_FILE = hsscene/Info.plist;
|
INFOPLIST_FILE = hsscene/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
@ -758,7 +758,7 @@
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock.hsscene;
|
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock.hsscene;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
@ -777,7 +777,7 @@
|
||||||
CODE_SIGN_ENTITLEMENTS = hssceneExtension.entitlements;
|
CODE_SIGN_ENTITLEMENTS = hssceneExtension.entitlements;
|
||||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 2;
|
CURRENT_PROJECT_VERSION = 1;
|
||||||
DEVELOPMENT_TEAM = PRBH2T6668;
|
DEVELOPMENT_TEAM = PRBH2T6668;
|
||||||
INFOPLIST_FILE = hsscene/Info.plist;
|
INFOPLIST_FILE = hsscene/Info.plist;
|
||||||
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
|
||||||
|
@ -786,7 +786,7 @@
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
"@executable_path/../../Frameworks",
|
"@executable_path/../../Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.2.1;
|
MARKETING_VERSION = 1.3;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock.hsscene;
|
PRODUCT_BUNDLE_IDENTIFIER = dev.mpg13.grandfatherrock.hsscene;
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SKIP_INSTALL = YES;
|
SKIP_INSTALL = YES;
|
||||||
|
|
Binary file not shown.
BIN
grandfatherrock/.DS_Store
vendored
BIN
grandfatherrock/.DS_Store
vendored
Binary file not shown.
BIN
grandfatherrock/Assets.xcassets/.DS_Store
vendored
BIN
grandfatherrock/Assets.xcassets/.DS_Store
vendored
Binary file not shown.
23
grandfatherrock/Assets.xcassets/grasssnow.imageset/Contents.json
vendored
Normal file
23
grandfatherrock/Assets.xcassets/grasssnow.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"filename" : "grasssnow.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "grasssnow-1.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "grasssnow-2.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow-1.png
vendored
Normal file
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow-1.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow-2.png
vendored
Normal file
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow-2.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow.png
vendored
Normal file
BIN
grandfatherrock/Assets.xcassets/grasssnow.imageset/grasssnow.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 17 KiB |
|
@ -4,7 +4,6 @@
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<deployment identifier="iOS"/>
|
<deployment identifier="iOS"/>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="18093"/>
|
||||||
<capability name="Image references" minToolsVersion="12.0"/>
|
|
||||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||||
|
@ -47,6 +46,17 @@
|
||||||
<action selector="play:" destination="9pv-A4-QxB" eventType="touchUpInside" id="3Tt-QE-VYp"/>
|
<action selector="play:" destination="9pv-A4-QxB" eventType="touchUpInside" id="3Tt-QE-VYp"/>
|
||||||
</connections>
|
</connections>
|
||||||
</button>
|
</button>
|
||||||
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="EB1-zK-bx6">
|
||||||
|
<rect key="frame" x="30" y="344.5" width="260" height="32"/>
|
||||||
|
<segments>
|
||||||
|
<segment title="☀️"/>
|
||||||
|
<segment title="🌧"/>
|
||||||
|
<segment title="❄️"/>
|
||||||
|
</segments>
|
||||||
|
<connections>
|
||||||
|
<action selector="weatherControlChanged:" destination="9pv-A4-QxB" eventType="valueChanged" id="xx5-0I-9LA"/>
|
||||||
|
</connections>
|
||||||
|
</segmentedControl>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hh:mm am" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ERT-d4-fi5">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="hh:mm am" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontForContentSizeCategory="YES" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ERT-d4-fi5">
|
||||||
<rect key="frame" x="8" y="20" width="304" height="100"/>
|
<rect key="frame" x="8" y="20" width="304" height="100"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
@ -79,21 +89,28 @@
|
||||||
<constraint firstItem="Ujw-y3-bt3" firstAttribute="leading" secondItem="PQr-Ze-W5v" secondAttribute="leading" constant="-2" id="M4e-yJ-sli"/>
|
<constraint firstItem="Ujw-y3-bt3" firstAttribute="leading" secondItem="PQr-Ze-W5v" secondAttribute="leading" constant="-2" id="M4e-yJ-sli"/>
|
||||||
<constraint firstItem="gBq-iQ-6kU" firstAttribute="trailing" secondItem="ERT-d4-fi5" secondAttribute="trailing" id="Qlw-5S-SBe"/>
|
<constraint firstItem="gBq-iQ-6kU" firstAttribute="trailing" secondItem="ERT-d4-fi5" secondAttribute="trailing" id="Qlw-5S-SBe"/>
|
||||||
<constraint firstItem="ERT-d4-fi5" firstAttribute="top" secondItem="PQr-Ze-W5v" secondAttribute="top" constant="20" id="abF-4H-3Jo"/>
|
<constraint firstItem="ERT-d4-fi5" firstAttribute="top" secondItem="PQr-Ze-W5v" secondAttribute="top" constant="20" id="abF-4H-3Jo"/>
|
||||||
|
<constraint firstItem="EB1-zK-bx6" firstAttribute="width" secondItem="Nou-CB-qnJ" secondAttribute="width" multiplier="3" priority="750" id="cSO-Rz-LDp"/>
|
||||||
<constraint firstItem="gBq-iQ-6kU" firstAttribute="leading" secondItem="ERT-d4-fi5" secondAttribute="leading" id="e83-8N-8nC"/>
|
<constraint firstItem="gBq-iQ-6kU" firstAttribute="leading" secondItem="ERT-d4-fi5" secondAttribute="leading" id="e83-8N-8nC"/>
|
||||||
|
<constraint firstItem="EB1-zK-bx6" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="PQr-Ze-W5v" secondAttribute="leading" constant="30" id="flf-Mt-dRH"/>
|
||||||
|
<constraint firstItem="EB1-zK-bx6" firstAttribute="centerX" secondItem="tsR-hK-woN" secondAttribute="centerX" id="hmh-4c-xiW"/>
|
||||||
<constraint firstItem="Nou-CB-qnJ" firstAttribute="centerX" secondItem="tsR-hK-woN" secondAttribute="centerX" id="iDP-6C-9Nk"/>
|
<constraint firstItem="Nou-CB-qnJ" firstAttribute="centerX" secondItem="tsR-hK-woN" secondAttribute="centerX" id="iDP-6C-9Nk"/>
|
||||||
|
<constraint firstItem="PQr-Ze-W5v" firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="EB1-zK-bx6" secondAttribute="trailing" constant="30" id="oyN-uE-9KT"/>
|
||||||
<constraint firstItem="gBq-iQ-6kU" firstAttribute="top" secondItem="ERT-d4-fi5" secondAttribute="bottom" constant="8" symbolic="YES" id="suB-Xs-y8e"/>
|
<constraint firstItem="gBq-iQ-6kU" firstAttribute="top" secondItem="ERT-d4-fi5" secondAttribute="bottom" constant="8" symbolic="YES" id="suB-Xs-y8e"/>
|
||||||
<constraint firstItem="1nc-vR-sG8" firstAttribute="top" secondItem="tsR-hK-woN" secondAttribute="top" id="uQw-4j-WKL"/>
|
<constraint firstItem="1nc-vR-sG8" firstAttribute="top" secondItem="tsR-hK-woN" secondAttribute="top" id="uQw-4j-WKL"/>
|
||||||
|
<constraint firstItem="EB1-zK-bx6" firstAttribute="top" secondItem="Nou-CB-qnJ" secondAttribute="bottom" constant="20" id="yyd-CT-dqP"/>
|
||||||
<constraint firstItem="Ujw-y3-bt3" firstAttribute="trailing" secondItem="PQr-Ze-W5v" secondAttribute="trailing" constant="2" id="zIw-Ko-SKq"/>
|
<constraint firstItem="Ujw-y3-bt3" firstAttribute="trailing" secondItem="PQr-Ze-W5v" secondAttribute="trailing" constant="2" id="zIw-Ko-SKq"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<tabBarItem key="tabBarItem" title="Home" image="play.fill" catalog="system" id="acW-dT-cKf"/>
|
<tabBarItem key="tabBarItem" title="Home" image="play.fill" catalog="system" id="acW-dT-cKf"/>
|
||||||
<connections>
|
<connections>
|
||||||
<outlet property="PlayButtonSize" destination="1c8-JO-es0" id="aFW-tJ-O5u"/>
|
<outlet property="PlayButtonSize" destination="1c8-JO-es0" id="aFW-tJ-O5u"/>
|
||||||
|
<outlet property="barbutton" destination="acW-dT-cKf" id="k9q-7x-OVQ"/>
|
||||||
<outlet property="controlButton" destination="Nou-CB-qnJ" id="s10-cM-NWa"/>
|
<outlet property="controlButton" destination="Nou-CB-qnJ" id="s10-cM-NWa"/>
|
||||||
<outlet property="gradientView" destination="1nc-vR-sG8" id="bJA-Q5-DBR"/>
|
<outlet property="gradientView" destination="1nc-vR-sG8" id="bJA-Q5-DBR"/>
|
||||||
<outlet property="sceneryImageView" destination="Ujw-y3-bt3" id="zJN-5h-eRp"/>
|
<outlet property="sceneryImageView" destination="Ujw-y3-bt3" id="zJN-5h-eRp"/>
|
||||||
<outlet property="songLabel" destination="gBq-iQ-6kU" id="SyO-qx-0Rf"/>
|
<outlet property="songLabel" destination="gBq-iQ-6kU" id="SyO-qx-0Rf"/>
|
||||||
<outlet property="timeLabel" destination="ERT-d4-fi5" id="pOH-To-ihA"/>
|
<outlet property="timeLabel" destination="ERT-d4-fi5" id="pOH-To-ihA"/>
|
||||||
|
<outlet property="weatherControl" destination="EB1-zK-bx6" id="s7V-bH-dQX"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
|
||||||
|
@ -113,8 +130,19 @@
|
||||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
</view>
|
</view>
|
||||||
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="jWY-Sn-qfF">
|
||||||
|
<rect key="frame" x="16" y="47" width="288" height="32"/>
|
||||||
|
<segments>
|
||||||
|
<segment title="☀️"/>
|
||||||
|
<segment title="🌧"/>
|
||||||
|
<segment title="❄️"/>
|
||||||
|
</segments>
|
||||||
|
<connections>
|
||||||
|
<action selector="selectListControlChanged:" destination="8rJ-Kc-sve" eventType="valueChanged" id="gUl-S3-X1i"/>
|
||||||
|
</connections>
|
||||||
|
</segmentedControl>
|
||||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EyG-9P-mxm">
|
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="EyG-9P-mxm">
|
||||||
<rect key="frame" x="16" y="47" width="288" height="392"/>
|
<rect key="frame" x="16" y="86" width="288" height="353"/>
|
||||||
<color key="backgroundColor" systemColor="systemFillColor"/>
|
<color key="backgroundColor" systemColor="systemFillColor"/>
|
||||||
<prototypes>
|
<prototypes>
|
||||||
<tableViewCell clipsSubviews="YES" contentMode="scaleAspectFit" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="hourcell" rowHeight="80" id="4WK-Bk-wob" customClass="hourDataCell" customModule="Nook_Music" customModuleProvider="target">
|
<tableViewCell clipsSubviews="YES" contentMode="scaleAspectFit" insetsLayoutMarginsFromSafeArea="NO" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="hourcell" rowHeight="80" id="4WK-Bk-wob" customClass="hourDataCell" customModule="Nook_Music" customModuleProvider="target">
|
||||||
|
@ -168,11 +196,11 @@
|
||||||
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="tNe-0A-XZP">
|
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="tNe-0A-XZP">
|
||||||
<rect key="frame" x="16" y="8" width="288" height="32"/>
|
<rect key="frame" x="16" y="8" width="288" height="32"/>
|
||||||
<segments>
|
<segments>
|
||||||
<segment title="First"/>
|
<segment title="1"/>
|
||||||
<segment title="Second"/>
|
<segment title="2"/>
|
||||||
<segment title="Third"/>
|
<segment title="3"/>
|
||||||
<segment title="Fourth"/>
|
<segment title="4"/>
|
||||||
<segment title="Fifth"/>
|
<segment title="5"/>
|
||||||
</segments>
|
</segments>
|
||||||
<color key="selectedSegmentTintColor" systemColor="systemFillColor"/>
|
<color key="selectedSegmentTintColor" systemColor="systemFillColor"/>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -204,15 +232,19 @@
|
||||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="EyG-9P-mxm" firstAttribute="leading" secondItem="tNe-0A-XZP" secondAttribute="leading" id="0Ug-kD-Es8"/>
|
<constraint firstItem="EyG-9P-mxm" firstAttribute="leading" secondItem="tNe-0A-XZP" secondAttribute="leading" id="0Ug-kD-Es8"/>
|
||||||
|
<constraint firstItem="jWY-Sn-qfF" firstAttribute="centerX" secondItem="tNe-0A-XZP" secondAttribute="centerX" id="4n2-JS-CXX"/>
|
||||||
<constraint firstItem="O1u-W8-tvY" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" constant="16" id="7D2-6v-kz9"/>
|
<constraint firstItem="O1u-W8-tvY" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" constant="16" id="7D2-6v-kz9"/>
|
||||||
|
<constraint firstItem="jWY-Sn-qfF" firstAttribute="leading" secondItem="tNe-0A-XZP" secondAttribute="leading" id="ARZ-oO-8c6"/>
|
||||||
|
<constraint firstItem="jWY-Sn-qfF" firstAttribute="top" secondItem="tNe-0A-XZP" secondAttribute="bottom" constant="8" symbolic="YES" id="ASB-XD-Lbh"/>
|
||||||
<constraint firstItem="EyG-9P-mxm" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" id="D5N-RQ-J49"/>
|
<constraint firstItem="EyG-9P-mxm" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" id="D5N-RQ-J49"/>
|
||||||
<constraint firstItem="vLK-eh-BHE" firstAttribute="leading" secondItem="tNe-0A-XZP" secondAttribute="leading" id="MYc-UO-KEr"/>
|
<constraint firstItem="vLK-eh-BHE" firstAttribute="leading" secondItem="tNe-0A-XZP" secondAttribute="leading" id="MYc-UO-KEr"/>
|
||||||
<constraint firstItem="EyG-9P-mxm" firstAttribute="top" secondItem="tNe-0A-XZP" secondAttribute="bottom" constant="8" id="Y8x-0r-NO8"/>
|
|
||||||
<constraint firstItem="tNe-0A-XZP" firstAttribute="leading" secondItem="O1u-W8-tvY" secondAttribute="leading" constant="16" id="ZzX-JZ-R7L"/>
|
<constraint firstItem="tNe-0A-XZP" firstAttribute="leading" secondItem="O1u-W8-tvY" secondAttribute="leading" constant="16" id="ZzX-JZ-R7L"/>
|
||||||
<constraint firstItem="tNe-0A-XZP" firstAttribute="top" secondItem="O1u-W8-tvY" secondAttribute="top" constant="8" id="cBr-Ja-CsG"/>
|
<constraint firstItem="tNe-0A-XZP" firstAttribute="top" secondItem="O1u-W8-tvY" secondAttribute="top" constant="8" id="cBr-Ja-CsG"/>
|
||||||
|
<constraint firstItem="jWY-Sn-qfF" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" id="end-xj-tPH"/>
|
||||||
<constraint firstItem="vLK-eh-BHE" firstAttribute="bottom" secondItem="O1u-W8-tvY" secondAttribute="bottom" constant="-20" id="imQ-3z-Lky"/>
|
<constraint firstItem="vLK-eh-BHE" firstAttribute="bottom" secondItem="O1u-W8-tvY" secondAttribute="bottom" constant="-20" id="imQ-3z-Lky"/>
|
||||||
<constraint firstItem="vLK-eh-BHE" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" id="jKU-me-vte"/>
|
<constraint firstItem="vLK-eh-BHE" firstAttribute="trailing" secondItem="tNe-0A-XZP" secondAttribute="trailing" id="jKU-me-vte"/>
|
||||||
<constraint firstItem="vLK-eh-BHE" firstAttribute="top" secondItem="EyG-9P-mxm" secondAttribute="bottom" constant="20" id="lRh-DA-wzr"/>
|
<constraint firstItem="vLK-eh-BHE" firstAttribute="top" secondItem="EyG-9P-mxm" secondAttribute="bottom" constant="20" id="lRh-DA-wzr"/>
|
||||||
|
<constraint firstItem="EyG-9P-mxm" firstAttribute="top" secondItem="jWY-Sn-qfF" secondAttribute="bottom" constant="8" symbolic="YES" id="rv2-uM-8t6"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<tabBarItem key="tabBarItem" title="Select Music" image="music.note.list" catalog="system" id="cPa-gy-q4n"/>
|
<tabBarItem key="tabBarItem" title="Select Music" image="music.note.list" catalog="system" id="cPa-gy-q4n"/>
|
||||||
|
@ -220,25 +252,25 @@
|
||||||
<outlet property="gradientView" destination="MfW-5R-IkK" id="2mB-cs-cXs"/>
|
<outlet property="gradientView" destination="MfW-5R-IkK" id="2mB-cs-cXs"/>
|
||||||
<outlet property="hoursTable" destination="EyG-9P-mxm" id="nKa-0x-NrF"/>
|
<outlet property="hoursTable" destination="EyG-9P-mxm" id="nKa-0x-NrF"/>
|
||||||
<outlet property="selectListControl" destination="tNe-0A-XZP" id="Y9A-1K-Qj9"/>
|
<outlet property="selectListControl" destination="tNe-0A-XZP" id="Y9A-1K-Qj9"/>
|
||||||
|
<outlet property="selectListWeatherControl" destination="jWY-Sn-qfF" id="2U4-v2-GSL"/>
|
||||||
<segue destination="8LK-WS-C3a" kind="presentation" modalPresentationStyle="automatic" id="4kl-sn-3de"/>
|
<segue destination="8LK-WS-C3a" kind="presentation" modalPresentationStyle="automatic" id="4kl-sn-3de"/>
|
||||||
<segue destination="XMN-Ld-irO" kind="presentation" id="vuf-aN-ACY"/>
|
<segue destination="XMN-Ld-irO" kind="presentation" id="vuf-aN-ACY"/>
|
||||||
</connections>
|
</connections>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="748" y="358"/>
|
<point key="canvasLocation" x="746.25" y="357.04225352112678"/>
|
||||||
</scene>
|
</scene>
|
||||||
<!--Tab Bar Controller-->
|
<!--Tab Bar Controller-->
|
||||||
<scene sceneID="yl2-sM-qoP">
|
<scene sceneID="yl2-sM-qoP">
|
||||||
<objects>
|
<objects>
|
||||||
<tabBarController id="49e-Tb-3d3" sceneMemberID="viewController">
|
<tabBarController id="49e-Tb-3d3" sceneMemberID="viewController">
|
||||||
<tabBar key="tabBar" contentMode="scaleToFill" barStyle="black" translucent="NO" itemPositioning="fill" id="W28-zg-YXA">
|
<tabBar key="tabBar" contentMode="scaleToFill" barStyle="black" translucent="NO" backgroundImage="grass" itemPositioning="fill" id="W28-zg-YXA">
|
||||||
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
|
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<color key="tintColor" red="0.86256664989999998" green="0.69524472950000005" blue="0.2422021627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="tintColor" red="0.86256664989999998" green="0.69524472950000005" blue="0.2422021627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<color key="selectedImageTintColor" red="0.86256664989999998" green="0.69524472950000005" blue="0.2422021627" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="selectedImageTintColor" red="0.86274509799999999" green="0.69411764710000001" blue="0.24313725489999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
<imageReference key="backgroundImage" image="grass"/>
|
|
||||||
</tabBar>
|
</tabBar>
|
||||||
<connections>
|
<connections>
|
||||||
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
|
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
|
||||||
|
|
|
@ -166,8 +166,8 @@ public class musicHandler{
|
||||||
audioPlayer.play()
|
audioPlayer.play()
|
||||||
let mpic = MPNowPlayingInfoCenter.default()
|
let mpic = MPNowPlayingInfoCenter.default()
|
||||||
mpic.nowPlayingInfo = [
|
mpic.nowPlayingInfo = [
|
||||||
MPMediaItemPropertyTitle:"This Is a Test",
|
MPMediaItemPropertyTitle:"AC Tape Deck",
|
||||||
MPMediaItemPropertyArtist:"Matt Neuburg"
|
MPMediaItemPropertyArtist:"Micah Gomez"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,14 +196,16 @@ public class musicHandler{
|
||||||
}
|
}
|
||||||
|
|
||||||
struct GlobalVars {
|
struct GlobalVars {
|
||||||
static var musicSelectionID:[[UInt64]] = [[UInt64]](repeating: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], count: 5)
|
static var musicSelectionID:[[UInt64]] = [[UInt64]](repeating: [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0], count: 15)
|
||||||
static var musicSelection:[[String]] = [[String]](repeating: ["","","","","","","","","","","","","","","","","","","","","","","",""], count: 5)
|
static var musicSelection:[[String]] = [[String]](repeating: ["","","","","","","","","","","","","","","","","","","","","","","",""], count: 15)
|
||||||
static var musicFileURL:[[String]] = [[String]](repeating: ["","","","","","","","","","","","","","","","","","","","","","","",""], count: 5)
|
static var musicFileURL:[[String]] = [[String]](repeating: ["","","","","","","","","","","","","","","","","","","","","","","",""], count: 15)
|
||||||
static var musicFormatType:[[Bool]] = [[Bool]](repeating: [false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false], count: 5)
|
static var musicFormatType:[[Bool]] = [[Bool]](repeating: [false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false], count: 15)
|
||||||
|
|
||||||
static var selectedCell:Int? = nil
|
static var selectedCell:Int? = nil
|
||||||
|
|
||||||
static var selectedMusicList:Int = UserDefaults.standard.integer(forKey: "savedSelectedMusicList")
|
static var selectedMusicList:Int = UserDefaults.standard.integer(forKey: "savedSelectedMusicList")
|
||||||
|
static var selectedList:Int = UserDefaults.standard.integer(forKey: "savedSelectedList")
|
||||||
|
static var weatherList:Int = UserDefaults.standard.integer(forKey: "savedWeatherList")
|
||||||
static var musicStarted = false
|
static var musicStarted = false
|
||||||
static var currentMusicFormat:Bool = false
|
static var currentMusicFormat:Bool = false
|
||||||
static var titleName = UserDefaults.standard.string(forKey: "selectedTitle")
|
static var titleName = UserDefaults.standard.string(forKey: "selectedTitle")
|
||||||
|
@ -349,7 +351,7 @@ class FirstViewController: UIViewController{
|
||||||
if(!defaults.bool(forKey: "didRun")){
|
if(!defaults.bool(forKey: "didRun")){
|
||||||
defaults.set(0, forKey: "titleNo")
|
defaults.set(0, forKey: "titleNo")
|
||||||
//defaults.set(true, forKey: "didRun")
|
//defaults.set(true, forKey: "didRun")
|
||||||
for n in 0...4 {
|
for n in 0...14 {
|
||||||
print(n)
|
print(n)
|
||||||
GlobalVars.musicSelectionID[n] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
GlobalVars.musicSelectionID[n] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||||
GlobalVars.musicSelection[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
GlobalVars.musicSelection[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
|
@ -364,7 +366,7 @@ class FirstViewController: UIViewController{
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
if(!defaults.bool(forKey: "didUpdate")){
|
if(!defaults.bool(forKey: "didUpdate")){
|
||||||
for n in 0...4 {
|
for n in 0...14 {
|
||||||
print(n)
|
print(n)
|
||||||
GlobalVars.musicFormatType[n] = [false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false]
|
GlobalVars.musicFormatType[n] = [false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false]
|
||||||
GlobalVars.musicFileURL[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
GlobalVars.musicFileURL[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
|
@ -372,10 +374,27 @@ class FirstViewController: UIViewController{
|
||||||
defaults.set(true, forKey: "didUpdate")
|
defaults.set(true, forKey: "didUpdate")
|
||||||
print("appjustupdated")
|
print("appjustupdated")
|
||||||
}
|
}
|
||||||
|
if(!defaults.bool(forKey: "didUpdate2")){
|
||||||
|
for n in 5...14 {
|
||||||
|
print(n)
|
||||||
|
GlobalVars.musicFormatType[n] = [false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false,false]
|
||||||
|
GlobalVars.musicFileURL[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
|
GlobalVars.musicSelection[n] = ["","","","","","","","","","","","","","","","","","","","","","","",""]
|
||||||
|
GlobalVars.musicSelectionID[n] = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
|
||||||
|
}
|
||||||
|
do {try defaults.setObject(GlobalVars.musicSelection, forKey: "savedMusicSelection")} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {try defaults.setObject(GlobalVars.musicSelectionID, forKey: "savedMusicSelectionID")} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {try defaults.setObject(GlobalVars.musicFileURL, forKey: "savedMusicFileURL")} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {try defaults.setObject(GlobalVars.musicFormatType, forKey: "savedMusicFileType")} catch {/*print(error.localizedDescription)*/}
|
||||||
|
defaults.set(true, forKey: "didUpdate2")
|
||||||
|
print("appjustupdated")
|
||||||
|
}
|
||||||
do {GlobalVars.musicSelection = try defaults.getObject(forKey: "savedMusicSelection", castTo: [[String]].self)} catch {/*print(error.localizedDescription)*/}
|
do {GlobalVars.musicSelection = try defaults.getObject(forKey: "savedMusicSelection", castTo: [[String]].self)} catch {/*print(error.localizedDescription)*/}
|
||||||
do {GlobalVars.musicSelectionID = try defaults.getObject(forKey: "savedMusicSelectionID", castTo: [[UInt64]].self)} catch {/*print(error.localizedDescription)*/}
|
do {GlobalVars.musicSelectionID = try defaults.getObject(forKey: "savedMusicSelectionID", castTo: [[UInt64]].self)} catch {/*print(error.localizedDescription)*/}
|
||||||
do {GlobalVars.musicFileURL = try defaults.getObject(forKey: "savedMusicFileURL", castTo: [[String]].self)} catch {/*print(error.localizedDescription)*/}
|
do {GlobalVars.musicFileURL = try defaults.getObject(forKey: "savedMusicFileURL", castTo: [[String]].self)} catch {/*print(error.localizedDescription)*/}
|
||||||
do {GlobalVars.musicFormatType = try defaults.getObject(forKey: "savedMusicFileType", castTo: [[Bool]].self)} catch {/*print(error.localizedDescription)*/}
|
do {GlobalVars.musicFormatType = try defaults.getObject(forKey: "savedMusicFileType", castTo: [[Bool]].self)} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {GlobalVars.selectedMusicList = try defaults.getObject(forKey: "savedSelectedMusicList", castTo: Int.self)} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {GlobalVars.selectedList = try defaults.getObject(forKey: "savedSelectedList", castTo: Int.self)} catch {/*print(error.localizedDescription)*/}
|
||||||
//print("App Ran Before")
|
//print("App Ran Before")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -513,45 +532,6 @@ class FirstViewController: UIViewController{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*switch GlobalVars.selectedMusicList {
|
|
||||||
case 0:
|
|
||||||
for i in GlobalVars.musicSelectionID0 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 1:
|
|
||||||
for i in GlobalVars.musicSelectionID1 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
for i in GlobalVars.musicSelectionID2 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
for i in GlobalVars.musicSelectionID3 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
for i in GlobalVars.musicSelectionID4 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
for i in GlobalVars.musicSelectionID0 {
|
|
||||||
if (i != 0){
|
|
||||||
foundSong = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
if !foundSong && defaults.bool(forKey: "didRun") {
|
if !foundSong && defaults.bool(forKey: "didRun") {
|
||||||
let errorAlert = UIAlertController(title: "Song Error", message: "No songs found in this track. Please visit the 'Select Music' tab to set a song and get started!", preferredStyle: .alert)
|
let errorAlert = UIAlertController(title: "Song Error", message: "No songs found in this track. Please visit the 'Select Music' tab to set a song and get started!", preferredStyle: .alert)
|
||||||
|
|
||||||
|
@ -663,33 +643,28 @@ class FirstViewController: UIViewController{
|
||||||
|
|
||||||
gradient.locations = [0.00, 1.00]
|
gradient.locations = [0.00, 1.00]
|
||||||
|
|
||||||
/*let gradientChangeAnimation = CABasicAnimation(keyPath: "colors")
|
|
||||||
gradientChangeAnimation.duration = 5.0
|
|
||||||
if((GlobalVars.hour >= 8) && (GlobalVars.hour <= 19)){ //Daytime
|
|
||||||
//print("day")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.00, green: 0.31, blue: 0.59, alpha: 1).cgColor, UIColor(red: 0.07, green: 0.45, blue: 0.87, alpha: 1).cgColor]
|
|
||||||
} else if((GlobalVars.hour >= 20) && (GlobalVars.hour <= 21)){//Sunset
|
|
||||||
//print("sunset")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.00, green: 0.31, blue: 0.59, alpha: 1).cgColor, UIColor(red: 1.00, green: 0.61, blue: 0.43, alpha: 1).cgColor]
|
|
||||||
} else if((GlobalVars.hour >= 22) || (GlobalVars.hour <= 5)){//Night
|
|
||||||
//print("night")
|
|
||||||
gradientChangeAnimation.toValue = [
|
|
||||||
UIColor(red: 0.68, green: 0.67, blue: 1.0, alpha: 1).cgColor,
|
|
||||||
UIColor(red: 1.00, green: 0.00, blue: 0.09, alpha: 1).cgColor
|
|
||||||
]
|
|
||||||
} else if((GlobalVars.hour >= 6) && (GlobalVars.hour <= 7)){//Sunrise
|
|
||||||
//print("sunrise")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.02, green: 0.26, blue: 0.49, alpha: 1).cgColor, UIColor(red: 0.89, green: 0.68, blue: 0.60, alpha: 1).cgColor]
|
|
||||||
}
|
|
||||||
gradientChangeAnimation.autoreverses = true
|
|
||||||
gradientChangeAnimation.fillMode = CAMediaTimingFillMode.forwards
|
|
||||||
gradientChangeAnimation.isRemovedOnCompletion = false
|
|
||||||
gradient.add(gradientChangeAnimation, forKey: "colorChange")
|
|
||||||
*/
|
|
||||||
// add the gradient to the view
|
|
||||||
gradientView.layer.addSublayer(gradient)
|
gradientView.layer.addSublayer(gradient)
|
||||||
|
|
||||||
|
|
||||||
|
// MARK: CHANGE TAB BAR IMAGE
|
||||||
|
//navigationController?.navigationBar.setBackgroundImage(UIImage(imageLiteralResourceName: "snowgrass"), for: UIBarMetrics.default)
|
||||||
|
|
||||||
|
print("list is supposed to be \(GlobalVars.selectedList) in home screen")
|
||||||
|
print("weather list is supposed to be \(GlobalVars.weatherList) in home screen")
|
||||||
|
weatherControl.selectedSegmentIndex = GlobalVars.weatherList
|
||||||
|
if GlobalVars.weatherList == 0 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if GlobalVars.weatherList == 1 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if GlobalVars.weatherList == 2 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillDisappear(_ animated: Bool) {
|
override func viewWillDisappear(_ animated: Bool) {
|
||||||
|
@ -725,8 +700,8 @@ class FirstViewController: UIViewController{
|
||||||
} else{
|
} else{
|
||||||
|
|
||||||
GlobalVars.musicStarted = false
|
GlobalVars.musicStarted = false
|
||||||
musicPlayer.pause()
|
audioPlayer.stop()
|
||||||
audioPlayer.pause()
|
musicPlayer.stop()
|
||||||
|
|
||||||
controlButton.accessibilityLabel = "Play Button"
|
controlButton.accessibilityLabel = "Play Button"
|
||||||
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
controlButton.setBackgroundImage(UIImage(systemName: "play.circle"), for: UIControl.State.normal)
|
||||||
|
@ -930,6 +905,48 @@ class FirstViewController: UIViewController{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@IBOutlet var weatherControl: UISegmentedControl!
|
||||||
|
|
||||||
|
@IBOutlet var barbutton: UITabBarItem!
|
||||||
|
|
||||||
|
|
||||||
|
@IBAction func weatherControlChanged(_ sender: Any) {
|
||||||
|
|
||||||
|
MPMusicPlayerController.applicationMusicPlayer.stop()
|
||||||
|
audioPlayer.stop()
|
||||||
|
musicPlayer.stop()
|
||||||
|
var list = GlobalVars.selectedList
|
||||||
|
if weatherControl.selectedSegmentIndex == 0 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if weatherControl.selectedSegmentIndex == 1 {
|
||||||
|
list = list + 5
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if weatherControl.selectedSegmentIndex == 2 {
|
||||||
|
list = list + 10
|
||||||
|
|
||||||
|
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||||
|
}
|
||||||
|
|
||||||
|
GlobalVars.selectedMusicList = list
|
||||||
|
GlobalVars.weatherList = weatherControl.selectedSegmentIndex
|
||||||
|
|
||||||
|
print("selected playlist is \(list)")
|
||||||
|
|
||||||
|
//defaults.set(list, forKey: "savedSelectedList")
|
||||||
|
defaults.set(weatherControl.selectedSegmentIndex, forKey: "savedWeatherList")
|
||||||
|
//print(GlobalVars.selectedMusicList)
|
||||||
|
musicHandler.updateMusic()
|
||||||
|
//print("updating")
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*@objc func updateMusic(){
|
/*@objc func updateMusic(){
|
||||||
|
|
||||||
//timer.invalidate()
|
//timer.invalidate()
|
||||||
|
|
|
@ -76,6 +76,17 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
||||||
hourString = String(rowHour)
|
hourString = String(rowHour)
|
||||||
hourString.append(" PM")
|
hourString.append(" PM")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var weather = ""
|
||||||
|
if GlobalVars.weatherList == 0 {
|
||||||
|
weather = "☀️ "
|
||||||
|
} else if GlobalVars.weatherList == 1 {
|
||||||
|
weather = "🌧 "
|
||||||
|
} else if GlobalVars.weatherList == 2 {
|
||||||
|
weather = "❄️ "
|
||||||
|
}
|
||||||
|
|
||||||
|
hourString = "\(weather)\(hourString)"
|
||||||
|
|
||||||
cell.hourLabel?.text = hourString
|
cell.hourLabel?.text = hourString
|
||||||
cell.accessibilityLabel = cell.hourLabel.text
|
cell.accessibilityLabel = cell.hourLabel.text
|
||||||
|
@ -308,60 +319,43 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
||||||
|
|
||||||
@IBOutlet var selectListControl: UISegmentedControl!
|
@IBOutlet var selectListControl: UISegmentedControl!
|
||||||
|
|
||||||
|
@IBOutlet var selectListWeatherControl: UISegmentedControl!
|
||||||
|
|
||||||
@IBAction func selectListControlChanged(_ sender: Any) {
|
@IBAction func selectListControlChanged(_ sender: Any) {
|
||||||
|
|
||||||
MPMusicPlayerController.applicationMusicPlayer.stop()
|
MPMusicPlayerController.applicationMusicPlayer.stop()
|
||||||
audioPlayer.stop()
|
audioPlayer.stop()
|
||||||
|
musicPlayer.stop()
|
||||||
GlobalVars.selectedMusicList = selectListControl.selectedSegmentIndex
|
var list = selectListControl.selectedSegmentIndex
|
||||||
defaults.set(selectListControl.selectedSegmentIndex, forKey: "savedSelectedMusicList")
|
if selectListWeatherControl.selectedSegmentIndex == 0 {
|
||||||
//print(GlobalVars.selectedMusicList)
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
hoursTable.reloadData()
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
/*var noSongs = false
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
switch GlobalVars.selectedMusicList {
|
} else if selectListWeatherControl.selectedSegmentIndex == 1 {
|
||||||
case 0:
|
list = list + 5
|
||||||
for i in GlobalVars.musicSelectionID0 {
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
if (i == 0){
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
noSongs = true
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
}
|
} else if selectListWeatherControl.selectedSegmentIndex == 2 {
|
||||||
}
|
list = list + 10
|
||||||
case 1:
|
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||||
for i in GlobalVars.musicSelectionID1 {
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
if (i == 0){
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||||
noSongs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 2:
|
|
||||||
for i in GlobalVars.musicSelectionID2 {
|
|
||||||
if (i == 0){
|
|
||||||
noSongs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 3:
|
|
||||||
for i in GlobalVars.musicSelectionID3 {
|
|
||||||
if (i == 0){
|
|
||||||
noSongs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
case 4:
|
|
||||||
for i in GlobalVars.musicSelectionID4 {
|
|
||||||
if (i == 0){
|
|
||||||
noSongs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
for i in GlobalVars.musicSelectionID0 {
|
|
||||||
if (i == 0){
|
|
||||||
noSongs = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if noSongs {
|
GlobalVars.selectedMusicList = list
|
||||||
MPMusicPlayerController.applicationMusicPlayer.pause()
|
GlobalVars.weatherList = selectListWeatherControl.selectedSegmentIndex
|
||||||
//print("pausing")
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
print("selected playlist is \(list)")
|
||||||
|
|
||||||
|
print("saving savedSelectedList to \(selectListControl.selectedSegmentIndex)")
|
||||||
|
defaults.set(selectListControl.selectedSegmentIndex, forKey: "savedSelectedList")
|
||||||
|
print("saving savedSelectedMusicList to \(selectListControl.selectedSegmentIndex)")
|
||||||
|
defaults.set(selectListControl.selectedSegmentIndex, forKey: "savedSelectedMusicList")
|
||||||
|
print("saving savedWeatherList to \(selectListWeatherControl.selectedSegmentIndex)")
|
||||||
|
defaults.set(selectListWeatherControl.selectedSegmentIndex, forKey: "savedWeatherList")
|
||||||
|
//print(GlobalVars.selectedMusicList)
|
||||||
|
hoursTable.reloadData()
|
||||||
musicHandler.updateMusic()
|
musicHandler.updateMusic()
|
||||||
//print("updating")
|
//print("updating")
|
||||||
}
|
}
|
||||||
|
@ -418,33 +412,25 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
||||||
}
|
}
|
||||||
|
|
||||||
gradient.locations = [0.00, 1.00]
|
gradient.locations = [0.00, 1.00]
|
||||||
|
|
||||||
/*let gradientChangeAnimation = CABasicAnimation(keyPath: "colors")
|
|
||||||
gradientChangeAnimation.duration = 5.0
|
|
||||||
if((GlobalVars.hour >= 8) && (GlobalVars.hour <= 19)){ //Daytime
|
|
||||||
//print("day")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.00, green: 0.31, blue: 0.59, alpha: 1).cgColor, UIColor(red: 0.07, green: 0.45, blue: 0.87, alpha: 1).cgColor]
|
|
||||||
} else if((GlobalVars.hour >= 20) && (GlobalVars.hour <= 21)){//Sunset
|
|
||||||
//print("sunset")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.00, green: 0.31, blue: 0.59, alpha: 1).cgColor, UIColor(red: 1.00, green: 0.61, blue: 0.43, alpha: 1).cgColor]
|
|
||||||
} else if((GlobalVars.hour >= 22) || (GlobalVars.hour <= 5)){//Night
|
|
||||||
//print("night")
|
|
||||||
gradientChangeAnimation.toValue = [
|
|
||||||
UIColor(red: 0.68, green: 0.67, blue: 1.0, alpha: 1).cgColor,
|
|
||||||
UIColor(red: 1.00, green: 0.00, blue: 0.09, alpha: 1).cgColor
|
|
||||||
]
|
|
||||||
} else if((GlobalVars.hour >= 6) && (GlobalVars.hour <= 7)){//Sunrise
|
|
||||||
//print("sunrise")
|
|
||||||
gradientChangeAnimation.toValue = [UIColor(red: 0.02, green: 0.26, blue: 0.49, alpha: 1).cgColor, UIColor(red: 0.89, green: 0.68, blue: 0.60, alpha: 1).cgColor]
|
|
||||||
}
|
|
||||||
gradientChangeAnimation.autoreverses = true
|
|
||||||
gradientChangeAnimation.fillMode = CAMediaTimingFillMode.forwards
|
|
||||||
gradientChangeAnimation.isRemovedOnCompletion = false
|
|
||||||
gradient.add(gradientChangeAnimation, forKey: "colorChange")
|
|
||||||
*/
|
|
||||||
// add the gradient to the view
|
|
||||||
gradientView.layer.addSublayer(gradient)
|
gradientView.layer.addSublayer(gradient)
|
||||||
|
|
||||||
|
print("list is supposed to be \(GlobalVars.selectedList) in home screen")
|
||||||
|
print("weather list is supposed to be \(GlobalVars.weatherList) in music screen")
|
||||||
|
selectListWeatherControl.selectedSegmentIndex = GlobalVars.weatherList
|
||||||
|
if GlobalVars.weatherList == 0 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if GlobalVars.weatherList == 1 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grass")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.86, green: 0.69, blue: 0.24, alpha: 1.00)
|
||||||
|
} else if GlobalVars.weatherList == 2 {
|
||||||
|
let backImg: UIImage = UIImage(named: "grasssnow")!
|
||||||
|
self.tabBarController?.tabBar.backgroundImage = backImg
|
||||||
|
self.tabBarController?.tabBar.tintColor = UIColor(red: 0.12, green: 0.54, blue: 0.61, alpha: 1.00)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewWillDisappear(_ animated: Bool) {
|
override func viewWillDisappear(_ animated: Bool) {
|
||||||
|
@ -452,6 +438,7 @@ class SecondViewController: UIViewController, UITableViewDelegate, UITableViewDa
|
||||||
do {try defaults.setObject(GlobalVars.musicSelectionID, forKey: "savedMusicSelectionID")} catch {/*print(error.localizedDescription)*/}
|
do {try defaults.setObject(GlobalVars.musicSelectionID, forKey: "savedMusicSelectionID")} catch {/*print(error.localizedDescription)*/}
|
||||||
do {try defaults.setObject(GlobalVars.musicFileURL, forKey: "savedMusicFileURL")} catch {/*print(error.localizedDescription)*/}
|
do {try defaults.setObject(GlobalVars.musicFileURL, forKey: "savedMusicFileURL")} catch {/*print(error.localizedDescription)*/}
|
||||||
do {try defaults.setObject(GlobalVars.musicFormatType, forKey: "savedMusicFileType")} catch {/*print(error.localizedDescription)*/}
|
do {try defaults.setObject(GlobalVars.musicFormatType, forKey: "savedMusicFileType")} catch {/*print(error.localizedDescription)*/}
|
||||||
|
do {try defaults.setObject(GlobalVars.weatherList, forKey: "savedWeatherList")} catch {/*print(error.localizedDescription)*/}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidDisappear(_ animated: Bool) {
|
override func viewDidDisappear(_ animated: Bool) {
|
||||||
|
|
Reference in a new issue