mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-30 15:57:11 +00:00
38 lines
1.3 KiB
Swift
38 lines
1.3 KiB
Swift
//
|
|
// AboutViewController.swift
|
|
// SAPTracker
|
|
//
|
|
// Created by computing on 11/11/14.
|
|
// Copyright (c) 2014 com.sap.sailing. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
class AboutViewController: UIViewController, UIWebViewDelegate, UIAlertViewDelegate {
|
|
|
|
@IBOutlet weak var webView: UIWebView!
|
|
@IBOutlet weak var activityIndicator: UIActivityIndicatorView!
|
|
|
|
override func viewDidLoad() {
|
|
super.viewDidLoad()
|
|
webView!.loadRequest(NSURLRequest(URL: NSURL(string: "http://sapsailing.com")!))
|
|
}
|
|
|
|
@IBAction func done(sender: AnyObject) {
|
|
presentingViewController!.dismissViewControllerAnimated(true, completion: nil)
|
|
}
|
|
|
|
func webViewDidFinishLoad(webView: UIWebView) {
|
|
activityIndicator.stopAnimating()
|
|
}
|
|
|
|
func wwebView(webView: UIWebView, didFailLoadWithError error: NSError) {
|
|
activityIndicator.hidden = true
|
|
let alertView = UIAlertView(title: NSLocalizedString("Couldn't load about view", comment: ""), message: nil, delegate: nil, cancelButtonTitle: NSLocalizedString("Cancel", comment: ""))
|
|
alertView.show()
|
|
}
|
|
|
|
func alertView(alertView: UIAlertView, clickedButtonAtIndex buttonIndex: Int) {
|
|
presentingViewController!.dismissViewControllerAnimated(true, completion: nil)
|
|
}
|
|
} |