Open co-occurrence from recording

This commit is contained in:
relikd
2020-09-05 22:07:22 +02:00
parent 35a211f87f
commit 42b045fb85
6 changed files with 238 additions and 209 deletions

View File

@@ -48,13 +48,10 @@ class VCAnalysisBar: UIViewController, UITabBarDelegate {
}
private func openCoOccurrence() {
guard let delegate = parent as? AnalysisBarDelegate,
let vc: VCCoOccurrence = storyboard?.load("IBCoOccurrence") else {
guard let delegate = parent as? AnalysisBarDelegate else {
return
}
let info = delegate.analysisBarWillOpenCoOccurrence()
vc.domainName = info.domain
vc.isFQDN = info.isFQDN
present(vc, animated: true)
let x = delegate.analysisBarWillOpenCoOccurrence()
present(VCCoOccurrence.make(x.domain, isFQDN: x.isFQDN), animated: true)
}
}

View File

@@ -14,6 +14,14 @@ class VCCoOccurrence: UIViewController, UITableViewDataSource {
private var logTimeDelta: CGFloat = 1
private var logMaxCount: CGFloat = 1
static func make(_ domain: String, isFQDN: Bool = true) -> Self {
let story = UIStoryboard(name: "CoOccurrence", bundle: nil)
let vc = story.instantiateInitialViewController() as! Self
vc.domainName = domain
vc.isFQDN = isFQDN
return vc
}
override func viewDidLoad() {
super.viewDidLoad()
selectedTime = Prefs.ContextAnalyis.CoOccurrenceTime // calls `didSet` and `logTimeDelta`