Add log display functionality
This commit is contained in:
32
CapCollector/Presentation/LogViewController.swift
Normal file
32
CapCollector/Presentation/LogViewController.swift
Normal 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.
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user