diff --git a/OKKLineMin.xcodeproj/project.pbxproj b/OKKLineMin.xcodeproj/project.pbxproj index aaf6db8..762129d 100644 --- a/OKKLineMin.xcodeproj/project.pbxproj +++ b/OKKLineMin.xcodeproj/project.pbxproj @@ -33,7 +33,6 @@ 0012EE862019C6F600EEED92 /* OKValueView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0012EE712019C6F600EEED92 /* OKValueView.swift */; }; 0012EE872019C6F600EEED92 /* OKSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0012EE732019C6F600EEED92 /* OKSegmentView.swift */; }; 0012EE882019C6F600EEED92 /* OKKLineVolumeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0012EE752019C6F600EEED92 /* OKKLineVolumeView.swift */; }; - 0012EE8A2019C78700EEED92 /* OKKLineMinVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0012EE892019C78700EEED92 /* OKKLineMinVC.swift */; }; 006D8FCF20625C17008168AA /* CCKlineVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 006D8FCE20625C17008168AA /* CCKlineVC.swift */; }; 009ECEDF204FC8F200558BC0 /* CCSQLiteData.sqlite-shm in Resources */ = {isa = PBXBuildFile; fileRef = 009ECEDD204FC8F200558BC0 /* CCSQLiteData.sqlite-shm */; }; 009ECEE0204FC8F200558BC0 /* CCSQLiteData.sqlite-wal in Resources */ = {isa = PBXBuildFile; fileRef = 009ECEDE204FC8F200558BC0 /* CCSQLiteData.sqlite-wal */; }; @@ -73,7 +72,6 @@ 0012EE712019C6F600EEED92 /* OKValueView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OKValueView.swift; sourceTree = ""; }; 0012EE732019C6F600EEED92 /* OKSegmentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OKSegmentView.swift; sourceTree = ""; }; 0012EE752019C6F600EEED92 /* OKKLineVolumeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = OKKLineVolumeView.swift; sourceTree = ""; }; - 0012EE892019C78700EEED92 /* OKKLineMinVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OKKLineMinVC.swift; sourceTree = ""; }; 006D8FCE20625C17008168AA /* CCKlineVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CCKlineVC.swift; sourceTree = ""; }; 009ECEDD204FC8F200558BC0 /* CCSQLiteData.sqlite-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "CCSQLiteData.sqlite-shm"; sourceTree = ""; }; 009ECEDE204FC8F200558BC0 /* CCSQLiteData.sqlite-wal */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "CCSQLiteData.sqlite-wal"; sourceTree = ""; }; @@ -121,7 +119,6 @@ 0012EE532019C5CB00EEED92 /* CCSQLiteData */, 0012EDFB2019C45200EEED92 /* AppDelegate.swift */, 0012EDFD2019C45200EEED92 /* ViewController.swift */, - 0012EE892019C78700EEED92 /* OKKLineMinVC.swift */, 0012EDFF2019C45200EEED92 /* Main.storyboard */, 0012EE022019C45200EEED92 /* Assets.xcassets */, 0012EE042019C45200EEED92 /* LaunchScreen.storyboard */, @@ -405,7 +402,6 @@ 0012EE872019C6F600EEED92 /* OKSegmentView.swift in Sources */, 0012EE782019C6F600EEED92 /* OKBOLLModel.swift in Sources */, 0012EE7C2019C6F600EEED92 /* OKMACDModel.swift in Sources */, - 0012EE8A2019C78700EEED92 /* OKKLineMinVC.swift in Sources */, 0012EE842019C6F600EEED92 /* OKKLineDrawView.swift in Sources */, 0012EE572019C5CB00EEED92 /* CCSQLiteData.m in Sources */, 006D8FCF20625C17008168AA /* CCKlineVC.swift in Sources */, diff --git a/OKKLineMin/Base.lproj/Main.storyboard b/OKKLineMin/Base.lproj/Main.storyboard index da62530..62ee963 100644 --- a/OKKLineMin/Base.lproj/Main.storyboard +++ b/OKKLineMin/Base.lproj/Main.storyboard @@ -1,10 +1,10 @@ - + - + @@ -53,7 +53,7 @@ - + @@ -71,7 +71,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -106,36 +106,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -163,10 +133,10 @@ - + - + diff --git a/OKKLineMin/CCOneVC.swift b/OKKLineMin/CCOneVC.swift index 03d608e..4dcb279 100644 --- a/OKKLineMin/CCOneVC.swift +++ b/OKKLineMin/CCOneVC.swift @@ -16,4 +16,19 @@ class CCOneVC: UIViewController { // Do any additional setup after loading the view. } + + // 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.destinationViewController. + // Pass the selected object to the new view controller. + + if segue.destination != nil { + let vc : CCKlineVC = segue.destination as! CCKlineVC + if let vcString = segue.identifier { + if vcString == "one" { + vc.isFull = true; + } + } + } + } } diff --git a/OKKLineMin/OKKLineMinVC.swift b/OKKLineMin/OKKLineMinVC.swift deleted file mode 100644 index b81c533..0000000 --- a/OKKLineMin/OKKLineMinVC.swift +++ /dev/null @@ -1,77 +0,0 @@ -// -// OKKLineMinVC.swift -// OKKLineMin -// -// Created by dengyouhua on 25/01/2018. -// Copyright © 2018 cc | ccworld1000@gmail.com. All rights reserved. -// https://github.com/ccworld1000/OKKLineMin - -import UIKit - -class OKKLineMinVC: UIViewController { - - @IBOutlet weak var backgroundView: UIView! - var klineView: OKKLineView! - var backButton: UIButton!; - - override func viewDidLoad() { - super.viewDidLoad() - - loadingUI() - sqliteHandle() - } - - override func viewWillAppear(_ animated: Bool) { - super.viewWillAppear(animated) - UIApplication.shared.isStatusBarHidden = true - } - - override func viewWillDisappear(_ animated: Bool) { - super.viewWillDisappear(animated) - UIApplication.shared.isStatusBarHidden = false - } - - override var supportedInterfaceOrientations: UIInterfaceOrientationMask { - return .landscape - } - - @objc func backHandle(button: UIButton) { - dismiss(animated: true, completion: nil) - } - - func loadingUI() { - self.view.backgroundColor = OKConfiguration.sharedConfiguration.main.backgroundColor - klineView = OKKLineView() - backgroundView.addSubview(self.klineView) - klineView.snp.makeConstraints { (make) in - make.edges.equalToSuperview() - } - - backButton = UIButton(type: .custom) - backButton.setTitle("Back", for: .normal) - backButton.titleLabel?.font = UIFont.systemFont(size: 12) - backButton.backgroundColor = UIColor.blue - backButton.addTarget(self, action:#selector(backHandle(button:)) , for: .touchUpInside) - - backgroundView.addSubview(backButton) - backButton.snp.makeConstraints { (make) in - make.top.equalToSuperview() - make.left.equalToSuperview() - make.size.equalTo(CGSize(width: 50, height: 20)) - } - } - - func sqliteHandle() { - if let list = CCSQLiteData.readDefaultDataList() { - let datas = list as! [[Double]] - - var dataArray = [OKKLineModel]() - for data in datas { - let model = OKKLineModel(date: data[0], open: data[1], close: data[4], high: data[2], low: data[3], volume: data[5]) - dataArray.append(model) - } - - self.klineView.drawKLineView(klineModels: dataArray) - } - } -}