Added app icons, launch screen; changed colours in ViewControllers to colour literals
@@ -11,6 +11,7 @@
|
|||||||
2E65263AFD35D6B542E89AE4 /* Pods_AvH_Plan.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7605BB0678C9E27A1D3E9DAA /* Pods_AvH_Plan.framework */; };
|
2E65263AFD35D6B542E89AE4 /* Pods_AvH_Plan.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7605BB0678C9E27A1D3E9DAA /* Pods_AvH_Plan.framework */; };
|
||||||
A957A75122DDC15500E0A2ED /* MenuViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */; };
|
A957A75122DDC15500E0A2ED /* MenuViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */; };
|
||||||
A957A75222DDC15500E0A2ED /* MenuViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A957A75022DDC15500E0A2ED /* MenuViewCell.xib */; };
|
A957A75222DDC15500E0A2ED /* MenuViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A957A75022DDC15500E0A2ED /* MenuViewCell.xib */; };
|
||||||
|
A958A92222DF5388007052B0 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = A958A92422DF5388007052B0 /* Localizable.strings */; };
|
||||||
A96133802299867400B541D4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A961337F2299867400B541D4 /* AppDelegate.swift */; };
|
A96133802299867400B541D4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A961337F2299867400B541D4 /* AppDelegate.swift */; };
|
||||||
A96133822299867400B541D4 /* PlanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96133812299867400B541D4 /* PlanViewController.swift */; };
|
A96133822299867400B541D4 /* PlanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A96133812299867400B541D4 /* PlanViewController.swift */; };
|
||||||
A96133872299867400B541D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A96133852299867400B541D4 /* Main.storyboard */; };
|
A96133872299867400B541D4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A96133852299867400B541D4 /* Main.storyboard */; };
|
||||||
@@ -53,6 +54,9 @@
|
|||||||
7605BB0678C9E27A1D3E9DAA /* Pods_AvH_Plan.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AvH_Plan.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
7605BB0678C9E27A1D3E9DAA /* Pods_AvH_Plan.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AvH_Plan.framework; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewCell.swift; sourceTree = "<group>"; };
|
A957A74F22DDC15500E0A2ED /* MenuViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MenuViewCell.swift; sourceTree = "<group>"; };
|
||||||
A957A75022DDC15500E0A2ED /* MenuViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MenuViewCell.xib; sourceTree = "<group>"; };
|
A957A75022DDC15500E0A2ED /* MenuViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MenuViewCell.xib; sourceTree = "<group>"; };
|
||||||
|
A958A91E22DF528C007052B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
|
||||||
|
A958A92322DF5388007052B0 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
|
A958A92522DF538C007052B0 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||||
A961337C2299867400B541D4 /* AvH Plan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AvH Plan.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
A961337C2299867400B541D4 /* AvH Plan.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "AvH Plan.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||||
A961337F2299867400B541D4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
A961337F2299867400B541D4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||||
A96133812299867400B541D4 /* PlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanViewController.swift; sourceTree = "<group>"; };
|
A96133812299867400B541D4 /* PlanViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanViewController.swift; sourceTree = "<group>"; };
|
||||||
@@ -176,6 +180,7 @@
|
|||||||
A9D830A622DE258C00D7EA05 /* PlanViewCell.xib */,
|
A9D830A622DE258C00D7EA05 /* PlanViewCell.xib */,
|
||||||
A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */,
|
A96D4CC722DDE01A006BAB34 /* GeneralPlanViewController.swift */,
|
||||||
A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */,
|
A96D4CC922DDE184006BAB34 /* PersonalPlanViewController.swift */,
|
||||||
|
A958A92422DF5388007052B0 /* Localizable.strings */,
|
||||||
);
|
);
|
||||||
path = "AvH Plan";
|
path = "AvH Plan";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -288,6 +293,7 @@
|
|||||||
knownRegions = (
|
knownRegions = (
|
||||||
en,
|
en,
|
||||||
Base,
|
Base,
|
||||||
|
de,
|
||||||
);
|
);
|
||||||
mainGroup = A96133732299867300B541D4;
|
mainGroup = A96133732299867300B541D4;
|
||||||
productRefGroup = A961337D2299867400B541D4 /* Products */;
|
productRefGroup = A961337D2299867400B541D4 /* Products */;
|
||||||
@@ -307,6 +313,7 @@
|
|||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
A961338C2299867A00B541D4 /* LaunchScreen.storyboard in Resources */,
|
A961338C2299867A00B541D4 /* LaunchScreen.storyboard in Resources */,
|
||||||
|
A958A92222DF5388007052B0 /* Localizable.strings in Resources */,
|
||||||
A957A75222DDC15500E0A2ED /* MenuViewCell.xib in Resources */,
|
A957A75222DDC15500E0A2ED /* MenuViewCell.xib in Resources */,
|
||||||
A96133892299867A00B541D4 /* Assets.xcassets in Resources */,
|
A96133892299867A00B541D4 /* Assets.xcassets in Resources */,
|
||||||
A96133872299867400B541D4 /* Main.storyboard in Resources */,
|
A96133872299867400B541D4 /* Main.storyboard in Resources */,
|
||||||
@@ -480,10 +487,20 @@
|
|||||||
/* End PBXTargetDependency section */
|
/* End PBXTargetDependency section */
|
||||||
|
|
||||||
/* Begin PBXVariantGroup section */
|
/* Begin PBXVariantGroup section */
|
||||||
|
A958A92422DF5388007052B0 /* Localizable.strings */ = {
|
||||||
|
isa = PBXVariantGroup;
|
||||||
|
children = (
|
||||||
|
A958A92322DF5388007052B0 /* en */,
|
||||||
|
A958A92522DF538C007052B0 /* de */,
|
||||||
|
);
|
||||||
|
name = Localizable.strings;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
A96133852299867400B541D4 /* Main.storyboard */ = {
|
A96133852299867400B541D4 /* Main.storyboard */ = {
|
||||||
isa = PBXVariantGroup;
|
isa = PBXVariantGroup;
|
||||||
children = (
|
children = (
|
||||||
A96133862299867400B541D4 /* Base */,
|
A96133862299867400B541D4 /* Base */,
|
||||||
|
A958A91E22DF528C007052B0 /* de */,
|
||||||
);
|
);
|
||||||
name = Main.storyboard;
|
name = Main.storyboard;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -503,6 +520,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
@@ -564,6 +582,7 @@
|
|||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||||
|
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||||
CLANG_ANALYZER_NONNULL = YES;
|
CLANG_ANALYZER_NONNULL = YES;
|
||||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||||
|
|||||||
@@ -1,93 +1,111 @@
|
|||||||
{
|
{
|
||||||
"images" : [
|
"images" : [
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh20x2-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh20x3.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh29x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh29x3.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh40x2-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh40x3.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh60x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "iphone",
|
|
||||||
"size" : "60x60",
|
"size" : "60x60",
|
||||||
|
"idiom" : "iphone",
|
||||||
|
"filename" : "avh60x3.png",
|
||||||
"scale" : "3x"
|
"scale" : "3x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh20x1.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "20x20",
|
"size" : "20x20",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh20x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh29x1.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "29x29",
|
"size" : "29x29",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh29x2-1.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh40x1.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "40x40",
|
"size" : "40x40",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh40x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh76x1.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "76x76",
|
"size" : "76x76",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh76x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ipad",
|
|
||||||
"size" : "83.5x83.5",
|
"size" : "83.5x83.5",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "avh83,5x2.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"idiom" : "ios-marketing",
|
|
||||||
"size" : "1024x1024",
|
"size" : "1024x1024",
|
||||||
|
"idiom" : "ios-marketing",
|
||||||
|
"filename" : "app_icon_ios.png",
|
||||||
"scale" : "1x"
|
"scale" : "1x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 437 B |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 647 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 812 B |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
@@ -1,7 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13122.16" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||||
|
<device id="retina6_1" orientation="portrait">
|
||||||
|
<adaptation id="fullscreen"/>
|
||||||
|
</device>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13104.12"/>
|
<deployment identifier="iOS"/>
|
||||||
|
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
|
||||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
<capability name="Safe area layout guides" minToolsVersion="9.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"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
@@ -11,15 +15,39 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<subviews>
|
||||||
|
<tabBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QLu-GC-NzK">
|
||||||
|
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
|
||||||
|
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<viewLayoutGuide key="safeArea" id="h2U-4g-7Ak"/>
|
||||||
|
<items>
|
||||||
|
<tabBarItem title="" image="ic_writing" selectedImage="ic_writing" id="keQ-St-8hM"/>
|
||||||
|
<tabBarItem title="" image="ic_idea" selectedImage="ic_idea" id="spn-vi-J6I"/>
|
||||||
|
<tabBarItem title="" image="ic_information" selectedImage="ic_information" id="OBW-rE-k7z"/>
|
||||||
|
<tabBarItem title="" image="ic_tomato" selectedImage="ic_tomato" id="zev-fl-fMd"/>
|
||||||
|
</items>
|
||||||
|
</tabBar>
|
||||||
|
</subviews>
|
||||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||||
|
<constraints>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="QLu-GC-NzK" secondAttribute="bottom" id="QQT-h6-ci0"/>
|
||||||
|
<constraint firstItem="QLu-GC-NzK" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" id="RJl-XD-nho"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="QLu-GC-NzK" secondAttribute="trailing" id="SEZ-En-0Xe"/>
|
||||||
|
</constraints>
|
||||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||||
</view>
|
</view>
|
||||||
</viewController>
|
</viewController>
|
||||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||||
</objects>
|
</objects>
|
||||||
<point key="canvasLocation" x="53" y="375"/>
|
<point key="canvasLocation" x="52.173913043478265" y="375"/>
|
||||||
</scene>
|
</scene>
|
||||||
</scenes>
|
</scenes>
|
||||||
|
<resources>
|
||||||
|
<image name="ic_idea" width="16.5" height="25"/>
|
||||||
|
<image name="ic_information" width="25" height="25"/>
|
||||||
|
<image name="ic_tomato" width="25" height="25"/>
|
||||||
|
<image name="ic_writing" width="25" height="25"/>
|
||||||
|
</resources>
|
||||||
</document>
|
</document>
|
||||||
|
|||||||
@@ -15,10 +15,10 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController title="AvH Plan" id="9pv-A4-QxB" customClass="GeneralViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController title="AvH Plan" id="9pv-A4-QxB" customClass="GeneralViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
|
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="813"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<navigationBar contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F8V-CQ-shR">
|
<navigationBar contentMode="scaleToFill" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="F8V-CQ-shR">
|
||||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||||
<viewLayoutGuide key="safeArea" id="b9C-lJ-bz8"/>
|
<viewLayoutGuide key="safeArea" id="b9C-lJ-bz8"/>
|
||||||
<items>
|
<items>
|
||||||
@@ -48,15 +48,15 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController id="8rJ-Kc-sve" customClass="PersonalPlanViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="8rJ-Kc-sve" customClass="PersonalPlanViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
|
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="813"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="zYA-MY-Azp">
|
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zYA-MY-Azp">
|
||||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||||
<viewLayoutGuide key="safeArea" id="Or0-Ph-ylC"/>
|
<viewLayoutGuide key="safeArea" id="Or0-Ph-ylC"/>
|
||||||
<items>
|
<items>
|
||||||
<navigationItem title="Personal Plan" id="8j4-CR-EDO">
|
<navigationItem title="Personal Plan" id="8j4-CR-EDO">
|
||||||
<barButtonItem key="rightBarButtonItem" title="Customise" id="iH8-LX-SKF">
|
<barButtonItem key="rightBarButtonItem" title="Customize" id="iH8-LX-SKF">
|
||||||
<connections>
|
<connections>
|
||||||
<action selector="toolbarButtonCustomise:" destination="8rJ-Kc-sve" id="XTh-6F-m3e"/>
|
<action selector="toolbarButtonCustomise:" destination="8rJ-Kc-sve" id="XTh-6F-m3e"/>
|
||||||
</connections>
|
</connections>
|
||||||
@@ -87,10 +87,10 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController id="Ve9-lV-ekU" customClass="InfoViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="Ve9-lV-ekU" customClass="InfoViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="eFO-Bf-72I">
|
<view key="view" contentMode="scaleToFill" id="eFO-Bf-72I">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="813"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="n9O-m5-UQM">
|
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="n9O-m5-UQM">
|
||||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||||
<viewLayoutGuide key="safeArea" id="YA8-Ln-bdM"/>
|
<viewLayoutGuide key="safeArea" id="YA8-Ln-bdM"/>
|
||||||
<items>
|
<items>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="52.333333333333336"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="52.333333333333336"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6H8-lj-boN">
|
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6H8-lj-boN">
|
||||||
<rect key="frame" x="24" y="16" width="366" height="20.333333333333329"/>
|
<rect key="frame" x="24" y="15.999999999999998" width="366" height="20.333333333333329"/>
|
||||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
@@ -155,10 +155,10 @@
|
|||||||
<objects>
|
<objects>
|
||||||
<viewController id="bBH-of-tdd" customClass="MenuViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
<viewController id="bBH-of-tdd" customClass="MenuViewController" customModule="AvH_Plan" customModuleProvider="target" sceneMemberID="viewController">
|
||||||
<view key="view" contentMode="scaleToFill" id="nOs-f2-7qu">
|
<view key="view" contentMode="scaleToFill" id="nOs-f2-7qu">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/>
|
<rect key="frame" x="0.0" y="0.0" width="414" height="813"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translatesAutoresizingMaskIntoConstraints="NO" id="R10-r1-giF">
|
<navigationBar contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" layoutMarginsFollowReadableWidth="YES" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R10-r1-giF">
|
||||||
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
<rect key="frame" x="0.0" y="44" width="414" height="44"/>
|
||||||
<viewLayoutGuide key="safeArea" id="zEW-od-JDN"/>
|
<viewLayoutGuide key="safeArea" id="zEW-od-JDN"/>
|
||||||
<items>
|
<items>
|
||||||
@@ -187,10 +187,9 @@
|
|||||||
<scene sceneID="yl2-sM-qoP">
|
<scene sceneID="yl2-sM-qoP">
|
||||||
<objects>
|
<objects>
|
||||||
<tabBarController title="AvH Plan" id="49e-Tb-3d3" sceneMemberID="viewController">
|
<tabBarController title="AvH Plan" id="49e-Tb-3d3" sceneMemberID="viewController">
|
||||||
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
|
<tabBar key="tabBar" contentMode="scaleToFill" translucent="NO" 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" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
|
|
||||||
</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"/>
|
||||||
|
|||||||
@@ -32,37 +32,35 @@ class DataFetcher {
|
|||||||
|
|
||||||
func doAsync(do task: String, completionHandler: @escaping (_ substitutions: Array<Any>) -> ()) {
|
func doAsync(do task: String, completionHandler: @escaping (_ substitutions: Array<Any>) -> ()) {
|
||||||
DispatchQueue(label: "work-queue").async {
|
DispatchQueue(label: "work-queue").async {
|
||||||
var url = ""
|
let foodUrl = "https://djd4rkn355.github.io/food_test.html"
|
||||||
switch task {
|
let url = "https://djd4rkn355.github.io/subst_test.html"
|
||||||
case "menu": url = "https://djd4rkn355.github.io/food_test.html"
|
|
||||||
default: url = "https://djd4rkn355.github.io/subst_test.html"
|
|
||||||
}
|
|
||||||
Alamofire.request(url).responseString { response in
|
Alamofire.request(url).responseString { response in
|
||||||
if let html = response.result.value {
|
if let html = response.result.value {
|
||||||
switch task {
|
Alamofire.request(foodUrl).responseString { response in
|
||||||
case "plan": completionHandler(self.parseHTML(html: html, isPersonal: false))
|
if let foodHtml = response.result.value {
|
||||||
case "personal": completionHandler(self.parseHTML(html: html, isPersonal: true))
|
completionHandler(self.parseHTML(html: html, food: foodHtml, type: task))
|
||||||
case "info": completionHandler(self.parseInformation(html: html))
|
}
|
||||||
default: completionHandler(self.parseMenu(html: html))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseHTML(html: String, isPersonal: Bool) -> Array<SubstModel> {
|
func parseHTML(html: String, food: String, type: String) -> Array<Any> {
|
||||||
var subst = Array<SubstModel>()
|
var subst = Array<SubstModel>()
|
||||||
var personalSubst = Array<SubstModel>()
|
var personalSubst = Array<SubstModel>()
|
||||||
|
var info = ""
|
||||||
|
var infoList = [String]()
|
||||||
|
|
||||||
|
var menuList = [String]()
|
||||||
do {
|
do {
|
||||||
let doc: Document = try SwiftSoup.parse(html)
|
let doc = try SwiftSoup.parse(html)
|
||||||
|
|
||||||
let rows: Elements = try doc.select("tr")
|
let rows: Elements = try doc.select("tr")
|
||||||
|
|
||||||
let courses = prefs.string(forKey: "courses")
|
let courses = prefs.string(forKey: "courses")
|
||||||
let classes = prefs.string(forKey: "classes")
|
let classes = prefs.string(forKey: "classes")
|
||||||
// let courses: String? = "GES7"
|
|
||||||
// let classes: String? = "17"
|
|
||||||
|
|
||||||
let db = try Connection("\(path)/db.sqlite3")
|
let db = try Connection("\(path)/db.sqlite3")
|
||||||
|
|
||||||
@@ -130,20 +128,53 @@ class DataFetcher {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch Exception.Error(let type, let message) {
|
let pi: Elements = try doc.select("p")
|
||||||
print(type)
|
|
||||||
print(message)
|
for item in pi {
|
||||||
} catch {
|
if info.isEmpty {
|
||||||
print("error")
|
info = try item.text()
|
||||||
}
|
} else {
|
||||||
if isPersonal {
|
info += "\n\n\(try item.text())"
|
||||||
return personalSubst
|
}
|
||||||
} else {
|
}
|
||||||
|
_ = prefs.set(info, forKey: "information")
|
||||||
|
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
infoList.append(info)
|
||||||
|
|
||||||
|
do {
|
||||||
|
let foodDoc: Document = try SwiftSoup.parse(food)
|
||||||
|
let ef: Elements = try foodDoc.select("th")
|
||||||
|
|
||||||
|
let db = try Connection("\(path)/db.sqlite3")
|
||||||
|
|
||||||
|
try db.run(foodmenu.create(ifNotExists: true) { t in
|
||||||
|
t.column(id, primaryKey: true)
|
||||||
|
t.column(text)
|
||||||
|
})
|
||||||
|
|
||||||
|
try db.run(foodmenu.delete())
|
||||||
|
|
||||||
|
for i in 0..<ef.size() {
|
||||||
|
menuList.append(try ef.get(i).text())
|
||||||
|
let insert = foodmenu.insert(text <- try ef.get(i).text())
|
||||||
|
_ = try db.run(insert)
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch {}
|
||||||
|
|
||||||
|
switch type {
|
||||||
|
case "plan":
|
||||||
return subst
|
return subst
|
||||||
|
case "personal":
|
||||||
|
return personalSubst
|
||||||
|
case "info":
|
||||||
|
return infoList
|
||||||
|
default:
|
||||||
|
return menuList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -169,63 +200,10 @@ class DataFetcher {
|
|||||||
return substs
|
return substs
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseInformation(html: String) -> [String] {
|
|
||||||
var info = ""
|
|
||||||
do {
|
|
||||||
let doc: Document = try SwiftSoup.parse(html)
|
|
||||||
let p: Elements = try doc.select("p")
|
|
||||||
|
|
||||||
for item in p {
|
|
||||||
if info.isEmpty {
|
|
||||||
info = try item.text()
|
|
||||||
} else {
|
|
||||||
info += "\n\n\(try item.text())"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ = prefs.set(info, forKey: "information")
|
|
||||||
|
|
||||||
} catch Exception.Error(let type, let message) {
|
|
||||||
print(type)
|
|
||||||
print(message)
|
|
||||||
} catch {
|
|
||||||
print("error")
|
|
||||||
}
|
|
||||||
var list = [String]()
|
|
||||||
list.append(info)
|
|
||||||
return list
|
|
||||||
}
|
|
||||||
|
|
||||||
func readInformation() -> String {
|
func readInformation() -> String {
|
||||||
return prefs.string(forKey: "information") ?? ""
|
return prefs.string(forKey: "information") ?? ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseMenu(html: String) -> [String] {
|
|
||||||
|
|
||||||
var items = [String]()
|
|
||||||
do {
|
|
||||||
let doc: Document = try SwiftSoup.parse(html)
|
|
||||||
let e: Elements = try doc.select("th")
|
|
||||||
|
|
||||||
let db = try Connection("\(path)/db.sqlite3")
|
|
||||||
|
|
||||||
try db.run(foodmenu.create(ifNotExists: true) { t in
|
|
||||||
t.column(id, primaryKey: true)
|
|
||||||
t.column(text)
|
|
||||||
})
|
|
||||||
|
|
||||||
try db.run(foodmenu.delete())
|
|
||||||
|
|
||||||
for i in 0..<e.size() {
|
|
||||||
items.append(try e.get(i).text())
|
|
||||||
let insert = foodmenu.insert(text <- try e.get(i).text())
|
|
||||||
_ = try db.run(insert)
|
|
||||||
}
|
|
||||||
|
|
||||||
} catch {}
|
|
||||||
|
|
||||||
return items
|
|
||||||
}
|
|
||||||
|
|
||||||
func readMenu() -> [String] {
|
func readMenu() -> [String] {
|
||||||
var menu = [String]()
|
var menu = [String]()
|
||||||
do {
|
do {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class GeneralViewController: PlanViewController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override func getRefreshViewString() -> String {
|
override func getRefreshViewString() -> String {
|
||||||
return "Fetching the plan..."
|
return NSLocalizedString("fetch_plan", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
override func getFromDatabase() -> [SubstModel] {
|
override func getFromDatabase() -> [SubstModel] {
|
||||||
|
|||||||
@@ -24,9 +24,10 @@ class InfoViewController : UIViewController {
|
|||||||
scrollView.addSubview(refreshControl)
|
scrollView.addSubview(refreshControl)
|
||||||
}
|
}
|
||||||
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
||||||
refreshControl.tintColor = UIColor(red: 0.39, green: 0.71, blue: 0.96, alpha: 1.0)
|
refreshControl.tintColor = #colorLiteral(red: 0.07843137255, green: 0.5568627451, blue: 1, alpha: 1)
|
||||||
refreshControl.attributedTitle = NSAttributedString(string: "Fetching some information...")
|
refreshControl.attributedTitle = NSAttributedString(string: NSLocalizedString("fetch_info", comment: ""))
|
||||||
self.scrollView.isDirectionalLockEnabled = true
|
self.scrollView.isDirectionalLockEnabled = true
|
||||||
|
content.text = df.readInformation()
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func objDoAsync(_ sender: Any) {
|
@objc private func objDoAsync(_ sender: Any) {
|
||||||
@@ -35,9 +36,4 @@ class InfoViewController : UIViewController {
|
|||||||
self.refreshControl.endRefreshing()
|
self.refreshControl.endRefreshing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
content.text = df.readInformation()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,20 @@
|
|||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ve8-vV-g8Y">
|
||||||
|
<rect key="frame" x="0.0" y="63" width="512" height="1"/>
|
||||||
|
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</view>
|
||||||
</subviews>
|
</subviews>
|
||||||
</view>
|
</view>
|
||||||
<constraints>
|
<constraints>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="ve8-vV-g8Y" secondAttribute="trailing" id="0ti-JN-3Z9"/>
|
||||||
<constraint firstItem="LRg-M9-Mh9" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="16" id="5zo-M7-gZh"/>
|
<constraint firstItem="LRg-M9-Mh9" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="16" id="5zo-M7-gZh"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="ve8-vV-g8Y" secondAttribute="bottom" id="AbT-cH-6Nh"/>
|
||||||
<constraint firstAttribute="trailing" secondItem="LRg-M9-Mh9" secondAttribute="trailing" constant="24" id="Bsa-Fp-zBH"/>
|
<constraint firstAttribute="trailing" secondItem="LRg-M9-Mh9" secondAttribute="trailing" constant="24" id="Bsa-Fp-zBH"/>
|
||||||
|
<constraint firstItem="ve8-vV-g8Y" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="WoG-wV-h6c"/>
|
||||||
<constraint firstItem="LRg-M9-Mh9" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="24" id="bVa-ZP-z1d"/>
|
<constraint firstItem="LRg-M9-Mh9" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="24" id="bVa-ZP-z1d"/>
|
||||||
|
<constraint firstItem="ve8-vV-g8Y" firstAttribute="top" secondItem="LRg-M9-Mh9" secondAttribute="bottom" constant="15" id="oLQ-A5-4UE"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="LRg-M9-Mh9" secondAttribute="bottom" constant="16" id="yRL-dW-1Yd"/>
|
<constraint firstAttribute="bottom" secondItem="LRg-M9-Mh9" secondAttribute="bottom" constant="16" id="yRL-dW-1Yd"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ class MenuViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
collectionView.register(UINib(nibName: "MenuViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
|
collectionView.register(UINib(nibName: "MenuViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
|
||||||
collectionView.dataSource = self
|
collectionView.dataSource = self
|
||||||
collectionView.delegate = self
|
collectionView.delegate = self
|
||||||
|
collectionView.backgroundColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||||
|
|
||||||
if #available(iOS 10.0, *) {
|
if #available(iOS 10.0, *) {
|
||||||
collectionView.refreshControl = refreshControl
|
collectionView.refreshControl = refreshControl
|
||||||
@@ -45,8 +46,11 @@ class MenuViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
collectionView.addSubview(refreshControl) // likely unnecessary
|
collectionView.addSubview(refreshControl) // likely unnecessary
|
||||||
}
|
}
|
||||||
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
||||||
refreshControl.tintColor = UIColor(red: 0.39, green: 0.71, blue: 0.96, alpha: 1.0)
|
refreshControl.tintColor = #colorLiteral(red: 0.07843137255, green: 0.5568627451, blue: 1, alpha: 1)
|
||||||
refreshControl.attributedTitle = NSAttributedString(string: "Fetching the food menu...")
|
refreshControl.attributedTitle = NSAttributedString(string: NSLocalizedString("fetch_menu", comment: ""))
|
||||||
|
|
||||||
|
self.items = self.df.readMenu()
|
||||||
|
self.collectionView.reloadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func objDoAsync(_ sender: Any) {
|
@objc private func objDoAsync(_ sender: Any) {
|
||||||
@@ -57,14 +61,6 @@ class MenuViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
collectionView.backgroundColor = UIColor(red: 0.8, green: 0.8, blue: 0.8, alpha: 1.0)
|
|
||||||
|
|
||||||
self.items = self.df.readMenu()
|
|
||||||
self.collectionView.reloadData()
|
|
||||||
}
|
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
return self.items.count
|
return self.items.count
|
||||||
}
|
}
|
||||||
@@ -108,7 +104,7 @@ class MenuViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
}
|
}
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, verticalSpacingForElementsInSectionAtIndex index: Int) -> CGFloat {
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, verticalSpacingForElementsInSectionAtIndex index: Int) -> CGFloat {
|
||||||
return 1
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetsForSectionAtIndex index: Int) -> UIEdgeInsets {
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetsForSectionAtIndex index: Int) -> UIEdgeInsets {
|
||||||
|
|||||||
@@ -14,18 +14,18 @@ class PersonalPlanViewController: PlanViewController {
|
|||||||
let prefs = UserDefaults.standard
|
let prefs = UserDefaults.standard
|
||||||
|
|
||||||
@IBAction func toolbarButtonCustomise(_ sender: UIBarButtonItem) {
|
@IBAction func toolbarButtonCustomise(_ sender: UIBarButtonItem) {
|
||||||
let alert = UIAlertController(title: "Customise personal page", message: nil, preferredStyle: .alert)
|
let alert = UIAlertController(title: NSLocalizedString("customize_alert_title", comment: ""), message: nil, preferredStyle: .alert)
|
||||||
alert.addTextField { (name) in
|
alert.addTextField { (name) in
|
||||||
name.text = self.prefs.string(forKey: "username")
|
name.text = self.prefs.string(forKey: "username")
|
||||||
name.placeholder = "Name"
|
name.placeholder = NSLocalizedString("name", comment: "")
|
||||||
}
|
}
|
||||||
alert.addTextField { (classes) in
|
alert.addTextField { (classes) in
|
||||||
classes.text = self.prefs.string(forKey: "classes")
|
classes.text = self.prefs.string(forKey: "classes")
|
||||||
classes.placeholder = "Classes"
|
classes.placeholder = NSLocalizedString("classes", comment: "")
|
||||||
}
|
}
|
||||||
alert.addTextField { (courses) in
|
alert.addTextField { (courses) in
|
||||||
courses.text = self.prefs.string(forKey: "courses")
|
courses.text = self.prefs.string(forKey: "courses")
|
||||||
courses.placeholder = "Courses"
|
courses.placeholder = NSLocalizedString("courses", comment: "")
|
||||||
}
|
}
|
||||||
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { [weak alert] (action) -> Void in
|
alert.addAction(UIAlertAction(title: "OK", style: .default, handler: { [weak alert] (action) -> Void in
|
||||||
_ = self.prefs.set(alert!.textFields![0].text, forKey: "username")
|
_ = self.prefs.set(alert!.textFields![0].text, forKey: "username")
|
||||||
@@ -42,24 +42,19 @@ class PersonalPlanViewController: PlanViewController {
|
|||||||
let user = self.prefs.string(forKey: "username")
|
let user = self.prefs.string(forKey: "username")
|
||||||
if (user != nil && user != "") {
|
if (user != nil && user != "") {
|
||||||
if (user!.last == "x" || user!.last == "s" || user!.last == "z") {
|
if (user!.last == "x" || user!.last == "s" || user!.last == "z") {
|
||||||
self.toolbar!.topItem!.title = "\(user!)' Plan"
|
self.toolbar!.topItem!.title = "\(user!)\(NSLocalizedString("nosplan", comment: ""))"
|
||||||
} else {
|
} else {
|
||||||
self.toolbar!.topItem!.title = "\(user!)'s Plan"
|
self.toolbar!.topItem!.title = "\(user!)\(NSLocalizedString("splan", comment: ""))"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override func getViewType() -> String {
|
override func getViewType() -> String {
|
||||||
return "personal"
|
return "personal"
|
||||||
}
|
}
|
||||||
|
|
||||||
override func getRefreshViewString() -> String {
|
override func getRefreshViewString() -> String {
|
||||||
return "Fetching your plan..."
|
return NSLocalizedString("fetch_personal", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
override func getFromDatabase() -> [SubstModel] {
|
override func getFromDatabase() -> [SubstModel] {
|
||||||
@@ -70,14 +65,4 @@ class PersonalPlanViewController: PlanViewController {
|
|||||||
return toolbar.bottomAnchor
|
return toolbar.bottomAnchor
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
// MARK: - Navigation
|
|
||||||
|
|
||||||
// In a storyboard-based application, you will often want to do a little preparation before navigation
|
|
||||||
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
|
|
||||||
// Get the new view controller using segue.destination.
|
|
||||||
// Pass the selected object to the new view controller.
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,11 +58,16 @@
|
|||||||
<nil key="textColor"/>
|
<nil key="textColor"/>
|
||||||
<nil key="highlightedColor"/>
|
<nil key="highlightedColor"/>
|
||||||
</label>
|
</label>
|
||||||
|
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BNy-Bm-Hfo">
|
||||||
|
<rect key="frame" x="0.0" y="107" width="512" height="1"/>
|
||||||
|
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
|
</view>
|
||||||
</subviews>
|
</subviews>
|
||||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="z2B-fh-0m1" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vzu-WZ-FPo" secondAttribute="trailing" constant="8" id="3kU-Ww-Qcw"/>
|
<constraint firstItem="z2B-fh-0m1" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="vzu-WZ-FPo" secondAttribute="trailing" constant="8" id="3kU-Ww-Qcw"/>
|
||||||
<constraint firstItem="47e-N3-adl" firstAttribute="top" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="16" id="5g6-Dx-f58"/>
|
<constraint firstItem="47e-N3-adl" firstAttribute="top" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="16" id="5g6-Dx-f58"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="BNy-Bm-Hfo" secondAttribute="trailing" id="6ZJ-3c-6Eu"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="F6T-RY-ZUE" secondAttribute="bottom" constant="16" id="CbT-RS-Wcv"/>
|
<constraint firstAttribute="bottom" secondItem="F6T-RY-ZUE" secondAttribute="bottom" constant="16" id="CbT-RS-Wcv"/>
|
||||||
<constraint firstItem="vzu-WZ-FPo" firstAttribute="leading" secondItem="Ay1-0Z-yKh" secondAttribute="leading" constant="24" id="E02-p0-1pW"/>
|
<constraint firstItem="vzu-WZ-FPo" firstAttribute="leading" secondItem="Ay1-0Z-yKh" secondAttribute="leading" constant="24" id="E02-p0-1pW"/>
|
||||||
<constraint firstItem="z2B-fh-0m1" firstAttribute="top" secondItem="kVO-L1-w44" secondAttribute="bottom" constant="8" id="FLB-1o-cei"/>
|
<constraint firstItem="z2B-fh-0m1" firstAttribute="top" secondItem="kVO-L1-w44" secondAttribute="bottom" constant="8" id="FLB-1o-cei"/>
|
||||||
@@ -74,12 +79,15 @@
|
|||||||
<constraint firstAttribute="trailing" secondItem="47e-N3-adl" secondAttribute="trailing" constant="24" id="d5g-l0-tid"/>
|
<constraint firstAttribute="trailing" secondItem="47e-N3-adl" secondAttribute="trailing" constant="24" id="d5g-l0-tid"/>
|
||||||
<constraint firstAttribute="bottom" secondItem="Jed-sH-OKY" secondAttribute="bottom" constant="16" id="di9-dn-Wfv"/>
|
<constraint firstAttribute="bottom" secondItem="Jed-sH-OKY" secondAttribute="bottom" constant="16" id="di9-dn-Wfv"/>
|
||||||
<constraint firstItem="vzu-WZ-FPo" firstAttribute="top" secondItem="kVO-L1-w44" secondAttribute="bottom" constant="8" id="fYW-HW-mSP"/>
|
<constraint firstItem="vzu-WZ-FPo" firstAttribute="top" secondItem="kVO-L1-w44" secondAttribute="bottom" constant="8" id="fYW-HW-mSP"/>
|
||||||
|
<constraint firstAttribute="bottom" secondItem="BNy-Bm-Hfo" secondAttribute="bottom" id="gZx-dG-A7M"/>
|
||||||
|
<constraint firstItem="BNy-Bm-Hfo" firstAttribute="leading" secondItem="Ay1-0Z-yKh" secondAttribute="leading" id="jLw-TQ-vvC"/>
|
||||||
<constraint firstItem="Jed-sH-OKY" firstAttribute="top" secondItem="vzu-WZ-FPo" secondAttribute="bottom" constant="8" id="kKA-h5-ADN"/>
|
<constraint firstItem="Jed-sH-OKY" firstAttribute="top" secondItem="vzu-WZ-FPo" secondAttribute="bottom" constant="8" id="kKA-h5-ADN"/>
|
||||||
<constraint firstItem="vzu-WZ-FPo" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="44" id="mZr-e4-cwy"/>
|
<constraint firstItem="vzu-WZ-FPo" firstAttribute="top" relation="greaterThanOrEqual" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="44" id="mZr-e4-cwy"/>
|
||||||
<constraint firstItem="47e-N3-adl" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="kVO-L1-w44" secondAttribute="trailing" constant="8" id="pGe-p1-Ger"/>
|
<constraint firstItem="47e-N3-adl" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="kVO-L1-w44" secondAttribute="trailing" constant="8" id="pGe-p1-Ger"/>
|
||||||
<constraint firstItem="Jed-sH-OKY" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="F6T-RY-ZUE" secondAttribute="trailing" constant="8" id="ryb-w6-jie"/>
|
<constraint firstItem="Jed-sH-OKY" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="F6T-RY-ZUE" secondAttribute="trailing" constant="8" id="ryb-w6-jie"/>
|
||||||
<constraint firstAttribute="trailing" secondItem="Jed-sH-OKY" secondAttribute="trailing" constant="24" id="uJx-Q7-VfS"/>
|
<constraint firstAttribute="trailing" secondItem="Jed-sH-OKY" secondAttribute="trailing" constant="24" id="uJx-Q7-VfS"/>
|
||||||
<constraint firstItem="kVO-L1-w44" firstAttribute="top" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="16" id="vic-2C-ffY"/>
|
<constraint firstItem="kVO-L1-w44" firstAttribute="top" secondItem="Ay1-0Z-yKh" secondAttribute="top" constant="16" id="vic-2C-ffY"/>
|
||||||
|
<constraint firstItem="BNy-Bm-Hfo" firstAttribute="top" secondItem="F6T-RY-ZUE" secondAttribute="bottom" constant="15" id="yXT-rV-p1f"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
</subviews>
|
</subviews>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
|
|
||||||
let identifier = "plan_cell"
|
let identifier = "plan_cell"
|
||||||
var substs = [SubstModel]()
|
var substs = [SubstModel]()
|
||||||
private let refreshControl = UIRefreshControl()
|
let refreshControl = UIRefreshControl()
|
||||||
let df = DataFetcher()
|
let df = DataFetcher()
|
||||||
let layout = MagazineLayout()
|
let layout = MagazineLayout()
|
||||||
var collectionView: UICollectionView
|
var collectionView: UICollectionView
|
||||||
@@ -41,6 +41,7 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
collectionView.register(UINib(nibName: "PlanViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
|
collectionView.register(UINib(nibName: "PlanViewCell", bundle: nil), forCellWithReuseIdentifier: identifier)
|
||||||
collectionView.dataSource = self
|
collectionView.dataSource = self
|
||||||
collectionView.delegate = self
|
collectionView.delegate = self
|
||||||
|
collectionView.backgroundColor = #colorLiteral(red: 1.0, green: 1.0, blue: 1.0, alpha: 1.0)
|
||||||
|
|
||||||
if #available(iOS 10.0, *) {
|
if #available(iOS 10.0, *) {
|
||||||
collectionView.refreshControl = refreshControl
|
collectionView.refreshControl = refreshControl
|
||||||
@@ -48,8 +49,11 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
collectionView.addSubview(refreshControl)
|
collectionView.addSubview(refreshControl)
|
||||||
}
|
}
|
||||||
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
refreshControl.addTarget(self, action: #selector(objDoAsync(_:)), for: .valueChanged)
|
||||||
refreshControl.tintColor = UIColor(red: 0.39, green: 0.71, blue: 0.96, alpha: 1.0)
|
refreshControl.tintColor = #colorLiteral(red: 0.07843137255, green: 0.5568627451, blue: 1, alpha: 1)
|
||||||
refreshControl.attributedTitle = NSAttributedString(string: getRefreshViewString())
|
refreshControl.attributedTitle = NSAttributedString(string: getRefreshViewString())
|
||||||
|
|
||||||
|
self.substs = getFromDatabase()
|
||||||
|
self.collectionView.reloadData()
|
||||||
}
|
}
|
||||||
|
|
||||||
func getViewType() -> String {
|
func getViewType() -> String {
|
||||||
@@ -61,7 +65,7 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
}
|
}
|
||||||
|
|
||||||
func getRefreshViewString() -> String {
|
func getRefreshViewString() -> String {
|
||||||
return "Fetching the plan..."
|
return NSLocalizedString("fetch_plan", comment: "")
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func objDoAsync(_ sender: Any) {
|
@objc private func objDoAsync(_ sender: Any) {
|
||||||
@@ -71,14 +75,6 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
self.refreshControl.endRefreshing()
|
self.refreshControl.endRefreshing()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override func viewDidLoad() {
|
|
||||||
super.viewDidLoad()
|
|
||||||
collectionView.backgroundColor = UIColor(red: 0.8, green: 0.8, blue: 0.8, alpha: 1.0)
|
|
||||||
|
|
||||||
self.substs = getFromDatabase()
|
|
||||||
self.collectionView.reloadData()
|
|
||||||
}
|
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||||
return self.substs.count
|
return self.substs.count
|
||||||
@@ -141,7 +137,7 @@ class PlanViewController : UIViewController, UICollectionViewDataSource, UIColle
|
|||||||
}
|
}
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, verticalSpacingForElementsInSectionAtIndex index: Int) -> CGFloat {
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, verticalSpacingForElementsInSectionAtIndex index: Int) -> CGFloat {
|
||||||
return 1
|
return 0 // change this if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetsForSectionAtIndex index: Int) -> UIEdgeInsets {
|
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetsForSectionAtIndex index: Int) -> UIEdgeInsets {
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
/* Class = "UITabBarItem"; title = "Information"; ObjectID = "OBW-rE-k7z"; */
|
||||||
|
"OBW-rE-k7z.title" = "Informationen";
|
||||||
|
|
||||||
|
/* Class = "UITabBarItem"; title = "Plan"; ObjectID = "keQ-St-8hM"; */
|
||||||
|
"keQ-St-8hM.title" = "Plan";
|
||||||
|
|
||||||
|
/* Class = "UITabBarItem"; title = "Personal"; ObjectID = "spn-vi-J6I"; */
|
||||||
|
"spn-vi-J6I.title" = "Persönlich";
|
||||||
|
|
||||||
|
/* Class = "UITabBarItem"; title = "Menu"; ObjectID = "zev-fl-fMd"; */
|
||||||
|
"zev-fl-fMd.title" = "Speiseplan";
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||