-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
192 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
} | ||
|
||
|
||
} |