Skip to content

Commit

Permalink
corona-infos
Browse files Browse the repository at this point in the history
  • Loading branch information
z1tr0t3c committed May 16, 2020
1 parent dfc1186 commit 4208327
Show file tree
Hide file tree
Showing 7 changed files with 192 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blista.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
2C9834831FF333520099A977 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 2C9834821FF333520099A977 /* GoogleService-Info.plist */; };
2C99089020BAE17E0013A8F7 /* NineteenthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C99088F20BAE17E0013A8F7 /* NineteenthViewController.swift */; };
2CA914CC1FDC402A00EC3B02 /* imprint.html in Resources */ = {isa = PBXBuildFile; fileRef = 2CA914CA1FDC402A00EC3B02 /* imprint.html */; };
2CAAF1F9247094ED00E0C77D /* TwentysixthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CAAF1F8247094ED00E0C77D /* TwentysixthViewController.swift */; };
2CC72DD71FE9CA28007F874E /* license.txt in Resources */ = {isa = PBXBuildFile; fileRef = 2CC72DD61FE9CA27007F874E /* license.txt */; };
2CCE94421FD4DF5C00335149 /* ThirteenthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CCE94411FD4DF5C00335149 /* ThirteenthViewController.swift */; };
2CD575CB1FD3A3AC0060057D /* TenthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CD575CA1FD3A3AC0060057D /* TenthViewController.swift */; };
Expand Down Expand Up @@ -109,6 +110,7 @@
2C9834821FF333520099A977 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
2C99088F20BAE17E0013A8F7 /* NineteenthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NineteenthViewController.swift; sourceTree = "<group>"; };
2CA914CA1FDC402A00EC3B02 /* imprint.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = imprint.html; sourceTree = "<group>"; };
2CAAF1F8247094ED00E0C77D /* TwentysixthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwentysixthViewController.swift; sourceTree = "<group>"; };
2CC72DD61FE9CA27007F874E /* license.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = license.txt; sourceTree = "<group>"; };
2CCE94411FD4DF5C00335149 /* ThirteenthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirteenthViewController.swift; sourceTree = "<group>"; };
2CD575CA1FD3A3AC0060057D /* TenthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TenthViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -231,6 +233,7 @@
2C2B2FC6213DA67500973A86 /* TwentythirdViewController.swift */,
2C3AC44822C56D5500BCE8AB /* TwentyfourthViewController.swift */,
2CFFA2C42401FFFE00CBE6F7 /* TwentyfifthViewController.swift */,
2CAAF1F8247094ED00E0C77D /* TwentysixthViewController.swift */,
2C803AED1FD0904D007A518B /* Reachability.swift */,
2C75DF5D1FDBB8EF00AC1A41 /* Crashlytics.framework */,
2C75DF5E1FDBB8EF00AC1A41 /* Fabric.framework */,
Expand Down Expand Up @@ -430,6 +433,7 @@
2CCE94421FD4DF5C00335149 /* ThirteenthViewController.swift in Sources */,
2C280887211BC2FE0062E975 /* TwentysecondViewController.swift in Sources */,
2C803AEE1FD0904D007A518B /* Reachability.swift in Sources */,
2CAAF1F9247094ED00E0C77D /* TwentysixthViewController.swift in Sources */,
2C84E6CF1FD50E4800671FB3 /* FourteenthViewController.swift in Sources */,
2C2EC08D1FD3F6CF0094CC16 /* TwelfthViewController.swift in Sources */,
2CF4E7941FCFCB3F00B29B8D /* FirstViewController.swift in Sources */,
Expand Down Expand Up @@ -590,7 +594,7 @@
INFOPLIST_FILE = blista/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.14.1;
MARKETING_VERSION = 1.15.0;
PRODUCT_BUNDLE_IDENTIFIER = de.zitrotec.blista;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -619,7 +623,7 @@
INFOPLIST_FILE = blista/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.14.1;
MARKETING_VERSION = 1.15.0;
PRODUCT_BUNDLE_IDENTIFIER = de.zitrotec.blista;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
23 changes: 23 additions & 0 deletions blista/Assets.xcassets/corona.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.
50 changes: 50 additions & 0 deletions blista/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -779,6 +779,7 @@
<segue destination="llN-Zp-4iU" kind="relationship" relationship="viewControllers" id="lzU-1b-eKA"/>
<segue destination="I8n-SG-7MR" kind="relationship" relationship="viewControllers" id="g5m-W4-TmA"/>
<segue destination="if7-Kh-cT4" kind="relationship" relationship="viewControllers" id="td4-gD-yqf"/>
<segue destination="N82-tg-lf0" kind="relationship" relationship="viewControllers" id="mDa-OI-hZl"/>
<segue destination="F6j-Q7-ZST" kind="relationship" relationship="viewControllers" id="pcg-QU-WhT"/>
<segue destination="0K8-oz-Dnh" kind="relationship" relationship="viewControllers" id="ahj-fk-RP7"/>
<segue destination="OaC-iV-C6A" kind="relationship" relationship="viewControllers" id="kR3-Yd-e7q"/>
Expand Down Expand Up @@ -1168,11 +1169,60 @@
</objects>
<point key="canvasLocation" x="-842" y="753"/>
</scene>
<!--Corona-Infos-->
<scene sceneID="x96-oK-TdR">
<objects>
<viewController title="Corona-Infos" automaticallyAdjustsScrollViewInsets="NO" id="N82-tg-lf0" customClass="TwentysixthViewController" customModule="blista" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Djf-bW-oAL"/>
<viewControllerLayoutGuide type="bottom" id="SNz-5g-BcB"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="F6e-Fb-wQ7">
<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="r0R-kG-Slm">
<rect key="frame" x="0.0" y="0.0" width="375" height="618"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES" address="YES"/>
<connections>
<outlet property="delegate" destination="N82-tg-lf0" id="E8O-hA-33G"/>
</connections>
</webView>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="pGz-S8-PFx">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<color key="color" systemColor="secondaryLabelColor" red="0.23529411759999999" green="0.23529411759999999" blue="0.26274509800000001" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints>
<constraint firstItem="r0R-kG-Slm" firstAttribute="top" secondItem="Djf-bW-oAL" secondAttribute="bottom" id="4mI-hI-1Qi"/>
<constraint firstItem="pGz-S8-PFx" firstAttribute="leading" secondItem="F6e-Fb-wQ7" secondAttribute="leading" id="Ai4-Hm-gHm"/>
<constraint firstItem="SNz-5g-BcB" firstAttribute="top" secondItem="r0R-kG-Slm" secondAttribute="bottom" id="NPb-h6-Y6O"/>
<constraint firstAttribute="bottom" secondItem="pGz-S8-PFx" secondAttribute="bottom" id="dc4-L1-tht"/>
<constraint firstItem="pGz-S8-PFx" firstAttribute="top" secondItem="F6e-Fb-wQ7" secondAttribute="top" id="kge-od-ybd"/>
<constraint firstAttribute="trailing" secondItem="r0R-kG-Slm" secondAttribute="trailing" id="lGK-nl-phW"/>
<constraint firstItem="r0R-kG-Slm" firstAttribute="leading" secondItem="F6e-Fb-wQ7" secondAttribute="leading" id="noB-3x-8Rz"/>
<constraint firstAttribute="trailing" secondItem="pGz-S8-PFx" secondAttribute="trailing" id="xla-8l-Ba3"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Corona-Infos" image="corona" id="4As-G1-oXZ"/>
<connections>
<outlet property="activity" destination="pGz-S8-PFx" id="HL1-lV-mIh"/>
<outlet property="webView26" destination="r0R-kG-Slm" id="e8g-q6-y4j"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="kx7-Up-lvE" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="2556" y="-294"/>
</scene>
</scenes>
<resources>
<image name="about" width="33.5" height="33.5"/>
<image name="ags" width="33.5" height="33.5"/>
<image name="ank" width="33.5" height="33.5"/>
<image name="corona" width="33.5" height="33.5"/>
<image name="ferien" width="33.5" height="33.5"/>
<image name="intranet" width="33.5" height="33.5"/>
<image name="katalog" width="33.5" height="33.5"/>
Expand Down
113 changes: 113 additions & 0 deletions blista/TwentysixthViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
//
// TwentysixthViewController.swift
// blista
//
// Created by Falk Rismansanj on 16.05.20.
// Copyright © 2020 Falk Rismansanj. All rights reserved.
//

import UIKit
import Crashlytics

class TwentysixthViewController: UIViewController, UIWebViewDelegate {

@IBOutlet weak var webView26: 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: "Corona",
contentType: "Corona",
contentId: "corona",
customAttributes: [:])

webView26.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/blista/corona.html")!))
case .cellular:

Answers.logContentView(withName: "Corona",
contentType: "Corona",
contentId: "corona",
customAttributes: [:])

webView26.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/blista/corona.html")!))
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: "Corona",
contentType: "Corona",
contentId: "corona",
customAttributes: [:])

webView26.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/blista/corona.html")!))
case .cellular:

Answers.logContentView(withName: "Corona",
contentType: "Corona",
contentId: "corona",
customAttributes: [:])

webView26.loadRequest(URLRequest(url: URL(string: "https://zitrotec.de/blista/corona.html")!))
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 4208327

Please sign in to comment.