Add log display functionality

This commit is contained in:
Christoph Hagen
2019-04-12 13:45:31 +02:00
parent 2806733b71
commit c13dd8b080
15 changed files with 130 additions and 45 deletions

View File

@ -0,0 +1,32 @@
//
// LogViewController.swift
// CapCollector
//
// Created by Christoph on 05.04.19.
// Copyright © 2019 CH. All rights reserved.
//
import UIKit
class LogViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
textView.text = logFile
}
@IBOutlet weak var textView: UITextView!
/*
// 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.
}
*/
}

View File

@ -116,6 +116,8 @@ class SettingsController: UITableViewController {
}
case 4: // Dropbox account
return true
case 5: // Log file
return true
default: return false
}
}
@ -136,6 +138,8 @@ class SettingsController: UITableViewController {
}
case 4: // Dropbox account
return indexPath
case 5: // Log file
return indexPath
default: return nil
}
}
@ -218,10 +222,18 @@ class SettingsController: UITableViewController {
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
guard let id = segue.identifier, id == "showMosaic" else {
guard let id = segue.identifier else {
return
}
(navigationController as! NavigationController).allowLandscape = true
switch id {
case "showMosaic":
(navigationController as! NavigationController).allowLandscape = true
case "showLog":
return
default:
return
}
}
}