Skip to content

Commit

Permalink
Stundenplan
Browse files Browse the repository at this point in the history
  • Loading branch information
z1tr0t3c committed Jun 27, 2019
1 parent 105579c commit 8ede48f
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 52 deletions.
101 changes: 51 additions & 50 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,67 +1,68 @@
PODS:
- Firebase/Core (5.20.2):
- Firebase/Core (6.3.0):
- Firebase/CoreOnly
- FirebaseAnalytics (= 5.8.1)
- Firebase/CoreOnly (5.20.2):
- FirebaseCore (= 5.4.1)
- Firebase/Messaging (5.20.2):
- FirebaseAnalytics (= 6.0.2)
- Firebase/CoreOnly (6.3.0):
- FirebaseCore (= 6.0.3)
- Firebase/Messaging (6.3.0):
- Firebase/CoreOnly
- FirebaseMessaging (= 3.5.0)
- FirebaseAnalytics (5.8.1):
- FirebaseCore (~> 5.4)
- FirebaseInstanceID (~> 3.8)
- GoogleAppMeasurement (= 5.8.1)
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- FirebaseMessaging (~> 4.1.0)
- FirebaseAnalytics (6.0.2):
- FirebaseCore (~> 6.0)
- FirebaseInstanceID (~> 4.2)
- GoogleAppMeasurement (= 6.0.2)
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 0.3)
- FirebaseAnalyticsInterop (1.2.0)
- FirebaseCore (5.4.1):
- GoogleUtilities/Environment (~> 5.2)
- GoogleUtilities/Logger (~> 5.2)
- FirebaseInstanceID (3.8.1):
- FirebaseCore (~> 5.2)
- GoogleUtilities/Environment (~> 5.2)
- GoogleUtilities/UserDefaults (~> 5.2)
- FirebaseMessaging (3.5.0):
- FirebaseCore (6.0.3):
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/Logger (~> 6.0)
- FirebaseInstanceID (4.2.0):
- FirebaseCore (~> 6.0)
- GoogleUtilities/Environment (~> 6.0)
- GoogleUtilities/UserDefaults (~> 6.0)
- FirebaseMessaging (4.1.0):
- FirebaseAnalyticsInterop (~> 1.1)
- FirebaseCore (~> 5.2)
- FirebaseInstanceID (~> 3.6)
- GoogleUtilities/Environment (~> 5.3)
- GoogleUtilities/Reachability (~> 5.3)
- GoogleUtilities/UserDefaults (~> 5.3)
- FirebaseCore (~> 6.0)
- FirebaseInstanceID (~> 4.1)
- GoogleUtilities/AppDelegateSwizzler (~> 6.2)
- GoogleUtilities/Environment (~> 6.2)
- GoogleUtilities/Reachability (~> 6.2)
- GoogleUtilities/UserDefaults (~> 6.2)
- Protobuf (~> 3.1)
- GoogleAppMeasurement (5.8.1):
- GoogleUtilities/AppDelegateSwizzler (~> 5.2)
- GoogleUtilities/MethodSwizzler (~> 5.2)
- GoogleUtilities/Network (~> 5.2)
- "GoogleUtilities/NSData+zlib (~> 5.2)"
- GoogleAppMeasurement (6.0.2):
- GoogleUtilities/AppDelegateSwizzler (~> 6.0)
- GoogleUtilities/MethodSwizzler (~> 6.0)
- GoogleUtilities/Network (~> 6.0)
- "GoogleUtilities/NSData+zlib (~> 6.0)"
- nanopb (~> 0.3)
- GoogleUtilities/AppDelegateSwizzler (5.7.0):
- GoogleUtilities/AppDelegateSwizzler (6.2.0):
- GoogleUtilities/Environment
- GoogleUtilities/Logger
- GoogleUtilities/Network
- GoogleUtilities/Environment (5.7.0)
- GoogleUtilities/Logger (5.7.0):
- GoogleUtilities/Environment (6.2.0)
- GoogleUtilities/Logger (6.2.0):
- GoogleUtilities/Environment
- GoogleUtilities/MethodSwizzler (5.7.0):
- GoogleUtilities/MethodSwizzler (6.2.0):
- GoogleUtilities/Logger
- GoogleUtilities/Network (5.7.0):
- GoogleUtilities/Network (6.2.0):
- GoogleUtilities/Logger
- "GoogleUtilities/NSData+zlib"
- GoogleUtilities/Reachability
- "GoogleUtilities/NSData+zlib (5.7.0)"
- GoogleUtilities/Reachability (5.7.0):
- "GoogleUtilities/NSData+zlib (6.2.0)"
- GoogleUtilities/Reachability (6.2.0):
- GoogleUtilities/Logger
- GoogleUtilities/UserDefaults (5.7.0):
- GoogleUtilities/UserDefaults (6.2.0):
- GoogleUtilities/Logger
- nanopb (0.3.901):
- nanopb/decode (= 0.3.901)
- nanopb/encode (= 0.3.901)
- nanopb/decode (0.3.901)
- nanopb/encode (0.3.901)
- Protobuf (3.7.0)
- Protobuf (3.8.0)

DEPENDENCIES:
- Firebase/Core
Expand All @@ -81,17 +82,17 @@ SPEC REPOS:
- Protobuf

SPEC CHECKSUMS:
Firebase: 0c8cf33f266410c61ab3e2265cfa412200351d9c
FirebaseAnalytics: ece1aa57a4f43c64d53a648b5a5e05151aae947b
Firebase: 8432d732974498afd5987e9001a05f90f1a3d625
FirebaseAnalytics: 470ddab7253b21ad5a40bebd4a9903d7ae19386a
FirebaseAnalyticsInterop: efbe45c8385ec626e29f9525e5ebd38520dfb6c1
FirebaseCore: f1a9a8be1aee4bf71a2fc0f4096df6788bdfda61
FirebaseInstanceID: a122b0c258720cf250551bb2bedf48c699f80d90
FirebaseMessaging: 4235f949ce1c4e827aeb19705ba5c53f9b85aa10
GoogleAppMeasurement: ffe513e90551844a739e7bcbb1d2aca1c28a4338
GoogleUtilities: 273e67030e0de313e7304f6dcfa96fc5214f6c23
FirebaseCore: 68f8a7f50cdae542715d4e86afa37c4067217dcb
FirebaseInstanceID: f20243a1d828e0e9a3798b995174dedc16f1b32a
FirebaseMessaging: 0ac5310133e6ada4cdd44d42e92038855214a5e9
GoogleAppMeasurement: a35a645835bae31b6bdc0576396bc23908f12a22
GoogleUtilities: 996e0db07153674fd1b54b220fda3a3dc3547cba
nanopb: 2901f78ea1b7b4015c860c2fdd1ea2fee1a18d48
Protobuf: 7a877b7f3e5964e3fce995e2eb323dbc6831bb5a
Protobuf: 3f617b9a6e73605565086864c9bc26b2bf2dd5a3

PODFILE CHECKSUM: 520344186de1f29c76e02112d62a271448eeb812

COCOAPODS: 1.7.0.beta.3
COCOAPODS: 1.7.2
4 changes: 4 additions & 0 deletions blista.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
2C280887211BC2FE0062E975 /* TwentysecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C280886211BC2FE0062E975 /* TwentysecondViewController.swift */; };
2C2B2FC8213DA67600973A86 /* TwentythirdViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */; };
2C2EC08D1FD3F6CF0094CC16 /* TwelfthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C2EC08C1FD3F6CF0094CC16 /* TwelfthViewController.swift */; };
2C3AC44922C56D5500BCE8AB /* TwentyfourthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */; };
2C3B6AF120AAFF93002A3F5A /* EighteenthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C3B6AF020AAFF93002A3F5A /* EighteenthViewController.swift */; };
2C3B6AF520AB0DF9002A3F5A /* links.html in Resources */ = {isa = PBXBuildFile; fileRef = 2C3B6AF420AB0DF9002A3F5A /* links.html */; };
2C3B6AF720AB244C002A3F5A /* privacy.html in Resources */ = {isa = PBXBuildFile; fileRef = 2C3B6AF620AB244C002A3F5A /* privacy.html */; };
Expand Down Expand Up @@ -79,6 +80,7 @@
2C280886211BC2FE0062E975 /* TwentysecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwentysecondViewController.swift; sourceTree = "<group>"; };
2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TwentythirdViewController.swift; path = /Users/falk/Documents/Xcode/blista/blista/TwentythirdViewController.swift; sourceTree = "<absolute>"; };
2C2EC08C1FD3F6CF0094CC16 /* TwelfthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwelfthViewController.swift; sourceTree = "<group>"; };
2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwentyfourthViewController.swift; sourceTree = "<group>"; };
2C3B6AF020AAFF93002A3F5A /* EighteenthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EighteenthViewController.swift; sourceTree = "<group>"; };
2C3B6AF420AB0DF9002A3F5A /* links.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = links.html; sourceTree = "<group>"; };
2C3B6AF620AB244C002A3F5A /* privacy.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = privacy.html; sourceTree = "<group>"; };
Expand Down Expand Up @@ -222,6 +224,7 @@
2C280884211BC28F0062E975 /* TwentyonethViewController.swift */,
2C280886211BC2FE0062E975 /* TwentysecondViewController.swift */,
2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */,
2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */,
2C803AED1FD0904D007A518B /* Reachability.swift */,
2C75DF5D1FDBB8EF00AC1A41 /* Crashlytics.framework */,
2C75DF5E1FDBB8EF00AC1A41 /* Fabric.framework */,
Expand Down Expand Up @@ -403,6 +406,7 @@
2C065DFF1FD52A3500BE5F17 /* SixteenViewController.swift in Sources */,
2C933D1C1FD0EBA000290D4E /* SeventhViewController.swift in Sources */,
2C280885211BC28F0062E975 /* TwentyonethViewController.swift in Sources */,
2C3AC44922C56D5500BCE8AB /* TwentyfourthViewController.swift in Sources */,
2CF4E7921FCFCB3F00B29B8D /* AppDelegate.swift in Sources */,
2C2B2FC8213DA67600973A86 /* TwentythirdViewController.swift in Sources */,
2CD575CB1FD3A3AC0060057D /* TenthViewController.swift in Sources */,
Expand Down
23 changes: 23 additions & 0 deletions blista/Assets.xcassets/stundenplan.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "[email protected]",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions blista/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,7 @@
<segue destination="0Jv-NH-Ln6" kind="relationship" relationship="viewControllers" id="2cP-Qu-LzX"/>
<segue destination="kRK-eb-wf8" kind="relationship" relationship="viewControllers" id="Xt5-Ly-Dri"/>
<segue destination="2uH-Bt-NE0" kind="relationship" relationship="viewControllers" id="ThI-5W-roc"/>
<segue destination="7rf-zX-VFj" kind="relationship" relationship="viewControllers" id="x33-9o-ydH"/>
<segue destination="Ocd-3f-nzJ" kind="relationship" relationship="viewControllers" id="S8U-dC-8QE"/>
<segue destination="oAU-qL-dtg" kind="relationship" relationship="viewControllers" id="igV-Gd-myV"/>
<segue destination="84B-Jf-E4e" kind="relationship" relationship="viewControllers" id="QP1-p5-9lP"/>
Expand Down Expand Up @@ -1056,6 +1057,53 @@
</objects>
<point key="canvasLocation" x="-842.39999999999998" y="-977.36131934032994"/>
</scene>
<!--Stundenplan-->
<scene sceneID="BPi-bt-7SD">
<objects>
<viewController title="Stundenplan" automaticallyAdjustsScrollViewInsets="NO" id="7rf-zX-VFj" customClass="TwentyfourthViewController" customModule="blista" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="4fT-QX-Pjr"/>
<viewControllerLayoutGuide type="bottom" id="7cT-zt-DCO"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="U4v-sa-8PE">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<webView contentMode="scaleToFill" scalesPageToFit="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vno-Ue-jCJ">
<rect key="frame" x="0.0" y="20" width="375" height="598"/>
<color key="backgroundColor" red="0.36078431370000003" green="0.38823529410000002" blue="0.4039215686" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES" address="YES" calendarEvent="YES"/>
<connections>
<outlet property="delegate" destination="7rf-zX-VFj" id="pgA-wn-KOX"/>
</connections>
</webView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="bo7-zd-8oY">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="color" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="bo7-zd-8oY" firstAttribute="top" secondItem="U4v-sa-8PE" secondAttribute="top" id="Q3z-lA-g69"/>
<constraint firstAttribute="trailing" secondItem="vno-Ue-jCJ" secondAttribute="trailing" id="XuL-cy-iBP"/>
<constraint firstItem="vno-Ue-jCJ" firstAttribute="top" secondItem="4fT-QX-Pjr" secondAttribute="bottom" id="cRr-K6-pvk"/>
<constraint firstItem="7cT-zt-DCO" firstAttribute="top" secondItem="vno-Ue-jCJ" secondAttribute="bottom" id="cwJ-sd-9Rv"/>
<constraint firstAttribute="bottom" secondItem="bo7-zd-8oY" secondAttribute="bottom" id="ePR-bg-VBj"/>
<constraint firstAttribute="trailing" secondItem="bo7-zd-8oY" secondAttribute="trailing" id="hhH-dX-wJe"/>
<constraint firstItem="vno-Ue-jCJ" firstAttribute="leading" secondItem="U4v-sa-8PE" secondAttribute="leading" id="mHe-8m-m5S"/>
<constraint firstItem="bo7-zd-8oY" firstAttribute="leading" secondItem="U4v-sa-8PE" secondAttribute="leading" id="rxQ-9u-7U4"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Stundenplan" image="stundenplan" id="eY1-j3-qde"/>
<connections>
<outlet property="activity" destination="bo7-zd-8oY" id="hfE-75-ama"/>
<outlet property="webView24" destination="vno-Ue-jCJ" id="4gC-Vg-FGu"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="pPg-ZK-RpE" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-842.39999999999998" y="-977.36131934032994"/>
</scene>
</scenes>
<resources>
<image name="about" width="33.5" height="33.5"/>
Expand All @@ -1071,6 +1119,7 @@
<image name="room" width="33.5" height="33.5"/>
<image name="speis1" width="33.5" height="33.5"/>
<image name="speis2" width="33.5" height="33.5"/>
<image name="stundenplan" width="33.5" height="33.5"/>
<image name="termine" width="33.5" height="33.5"/>
<image name="terminplan" width="33.5" height="33.5"/>
<image name="twitter" width="30" height="30"/>
Expand Down
4 changes: 2 additions & 2 deletions blista/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.10.0</string>
<string>1.11.0</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
Expand All @@ -32,7 +32,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>3</string>
<string>1</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
Expand Down
111 changes: 111 additions & 0 deletions blista/TwentyfourthViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
//
// TwentyfourthViewController.swift
// blista
//
// Created by Falk Rismansanj on 27.06.19.
// Copyright © 2019 Falk Rismansanj. All rights reserved.
//

import UIKit
import Crashlytics

class TwentyfourthViewController: UIViewController, UIWebViewDelegate {

@IBOutlet weak var webView24: UIWebView!
@IBOutlet weak var activity: UIActivityIndicatorView!

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view, typically from a nib.

let reachability = Reachability()!

switch reachability.connection {
case .wifi:

Answers.logContentView(withName: "Stundenplan",
contentType: "Stundenplan",
contentId: "stundenplan",
customAttributes: [:])

webView24.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/stundenplan/display.php")!))
case .cellular:

Answers.logContentView(withName: "Stundenplan",
contentType: "Stundenplan",
contentId: "stundenplan",
customAttributes: [:])

webView24.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/stundenplan/display.php")!))
case .none:
UIApplication.shared.isNetworkActivityIndicatorVisible = false
activity.stopAnimating()
navigationController?.popViewController(animated: true)
dismiss(animated: true, completion: nil)
let alert = UIAlertView()
alert.title = "Du bist Offline"
alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
alert.addButton(withTitle: "OK")
alert.show()
}
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

let reachability = Reachability()!

switch reachability.connection {
case .wifi:

Answers.logContentView(withName: "Stundenplan",
contentType: "Stundenplan",
contentId: "stundenplan",
customAttributes: [:])

webView24.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/stundenplan/display.php")!))
case .cellular:

Answers.logContentView(withName: "Stundenplan",
contentType: "Stundenplan",
contentId: "stundenplan",
customAttributes: [:])

webView24.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/stundenplan/display.php")!))
case .none:
UIApplication.shared.isNetworkActivityIndicatorVisible = false
activity.stopAnimating()
navigationController?.popViewController(animated: true)
dismiss(animated: true, completion: nil)
let alert = UIAlertView()
alert.title = "Du bist Offline"
alert.message = "Bitte stell eine Internetverbindung her, um diesen Inhalt anzuzeigen."
alert.addButton(withTitle: "OK")
alert.show()
}
}

func webViewDidStartLoad(_ webView: UIWebView)
{
UIApplication.shared.isNetworkActivityIndicatorVisible = true
activity.startAnimating()
}
func webViewDidFinishLoad(_ webView: UIWebView)
{
UIApplication.shared.isNetworkActivityIndicatorVisible = false
activity.stopAnimating()
}

func webView(_ webView: UIWebView, didFailLoadWithError error: Error) {
UIApplication.shared.isNetworkActivityIndicatorVisible = false
activity.stopAnimating()
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}


}

0 comments on commit 8ede48f

Please sign in to comment.