From 5e7c090429c75dee5631a05bcd341e179b946e64 Mon Sep 17 00:00:00 2001 From: AKosylo Date: Tue, 7 Nov 2023 12:48:12 +0100 Subject: [PATCH] WIP: search and add symbols --- DXFeedFramework.xcodeproj/project.pbxproj | 18 ++ .../QuoteTableApp/Base.lproj/Main.storyboard | 178 +++++++++++++++++- .../EditListViewController.swift | 32 ++++ .../QuoteTableViewController.swift | 3 +- .../SearchSymbolViewController.swift | 27 +++ Samples/QuoteTableApp/SymbolsDataSource.swift | 17 ++ 6 files changed, 269 insertions(+), 6 deletions(-) create mode 100644 Samples/QuoteTableApp/EditListViewController.swift create mode 100644 Samples/QuoteTableApp/SearchSymbolViewController.swift create mode 100644 Samples/QuoteTableApp/SymbolsDataSource.swift diff --git a/DXFeedFramework.xcodeproj/project.pbxproj b/DXFeedFramework.xcodeproj/project.pbxproj index 34e186e2c..6b6f98060 100644 --- a/DXFeedFramework.xcodeproj/project.pbxproj +++ b/DXFeedFramework.xcodeproj/project.pbxproj @@ -191,6 +191,8 @@ 647426AD2ABC85F20012F793 /* Arguments.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647426AC2ABC85F20012F793 /* Arguments.swift */; }; 647426AF2ABC93900012F793 /* EventCode+String.swift in Sources */ = {isa = PBXBuildFile; fileRef = 647426AE2ABC93900012F793 /* EventCode+String.swift */; }; 6479BC2B2A4F35A300A3D404 /* QuoteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6479BC2A2A4F35A300A3D404 /* QuoteView.swift */; }; + 6482D9A12AFA51B60029B153 /* SymbolsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6482D9A02AFA51B60029B153 /* SymbolsDataSource.swift */; }; + 6482D9A22AFA51B60029B153 /* SymbolsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6482D9A02AFA51B60029B153 /* SymbolsDataSource.swift */; }; 6486B9582AD00BDC00D8D5FA /* Summary.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B9572AD00BDC00D8D5FA /* Summary.swift */; }; 6486B95B2AD015B400D8D5FA /* PriceType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B95A2AD015B400D8D5FA /* PriceType.swift */; }; 6486B95D2AD0287E00D8D5FA /* DateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6486B95C2AD0287E00D8D5FA /* DateTests.swift */; }; @@ -331,6 +333,10 @@ 64ECD6822A9DDC2800B36935 /* DXInstrumentProfileReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64ECD6812A9DDC2800B36935 /* DXInstrumentProfileReader.swift */; }; 64ECD6852A9DDF6200B36935 /* DXInstrumentProfileCollector.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64ECD6842A9DDF6200B36935 /* DXInstrumentProfileCollector.swift */; }; 64ECD6872A9DDFBE00B36935 /* DXInstrumentProfileConnection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64ECD6862A9DDFBE00B36935 /* DXInstrumentProfileConnection.swift */; }; + 64F203D12AFA461C00224A0F /* EditListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F203D02AFA461C00224A0F /* EditListViewController.swift */; }; + 64F203D22AFA461C00224A0F /* EditListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F203D02AFA461C00224A0F /* EditListViewController.swift */; }; + 64F203D42AFA463B00224A0F /* SearchSymbolViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F203D32AFA463B00224A0F /* SearchSymbolViewController.swift */; }; + 64F203D52AFA463B00224A0F /* SearchSymbolViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64F203D32AFA463B00224A0F /* SearchSymbolViewController.swift */; }; 64FCAF902A572D4600971F4E /* libDxFeedGraalNativeSdk.dylib in Embed Libraries */ = {isa = PBXBuildFile; fileRef = 64125E352A1F689A00FB32BA /* libDxFeedGraalNativeSdk.dylib */; platformFilters = (macos, ); settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 64FFE59F2AD430E4003D3353 /* ScheduleSample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64FFE59E2AD430E4003D3353 /* ScheduleSample.swift */; }; 803BAC1629BFA50700FFAB1C /* DXFeedFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 803BAC0D29BFA50700FFAB1C /* DXFeedFramework.framework */; }; @@ -654,6 +660,7 @@ 647426AC2ABC85F20012F793 /* Arguments.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arguments.swift; sourceTree = ""; }; 647426AE2ABC93900012F793 /* EventCode+String.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "EventCode+String.swift"; sourceTree = ""; }; 6479BC2A2A4F35A300A3D404 /* QuoteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = QuoteView.swift; sourceTree = ""; }; + 6482D9A02AFA51B60029B153 /* SymbolsDataSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SymbolsDataSource.swift; sourceTree = ""; }; 6486B9572AD00BDC00D8D5FA /* Summary.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Summary.swift; sourceTree = ""; }; 6486B95A2AD015B400D8D5FA /* PriceType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PriceType.swift; sourceTree = ""; }; 6486B95C2AD0287E00D8D5FA /* DateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateTests.swift; sourceTree = ""; }; @@ -793,6 +800,8 @@ 64ECD6812A9DDC2800B36935 /* DXInstrumentProfileReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXInstrumentProfileReader.swift; sourceTree = ""; }; 64ECD6842A9DDF6200B36935 /* DXInstrumentProfileCollector.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXInstrumentProfileCollector.swift; sourceTree = ""; }; 64ECD6862A9DDFBE00B36935 /* DXInstrumentProfileConnection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DXInstrumentProfileConnection.swift; sourceTree = ""; }; + 64F203D02AFA461C00224A0F /* EditListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EditListViewController.swift; sourceTree = ""; }; + 64F203D32AFA463B00224A0F /* SearchSymbolViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchSymbolViewController.swift; sourceTree = ""; }; 64FFE59E2AD430E4003D3353 /* ScheduleSample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ScheduleSample.swift; sourceTree = ""; }; 803BAC0D29BFA50700FFAB1C /* DXFeedFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DXFeedFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 803BAC1029BFA50700FFAB1C /* DxFeedSwiftFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DxFeedSwiftFramework.h; sourceTree = ""; }; @@ -1303,6 +1312,9 @@ 64B6272C2A375C0E00196D07 /* QuoteViewController.swift */, 64B6272E2A375C0F00196D07 /* QuoteCell.swift */, 64B627342A375C0F00196D07 /* SceneDelegate.swift */, + 64F203D02AFA461C00224A0F /* EditListViewController.swift */, + 64F203D32AFA463B00224A0F /* SearchSymbolViewController.swift */, + 6482D9A02AFA51B60029B153 /* SymbolsDataSource.swift */, ); path = QuoteTableApp; sourceTree = ""; @@ -2043,12 +2055,15 @@ 644BD7742A44746000A0BF99 /* SceneDelegate.swift in Sources */, 644BD7792A44746C00A0BF99 /* DXFTimer.swift in Sources */, 644BD7702A44746000A0BF99 /* PaddingLabel.swift in Sources */, + 6482D9A22AFA51B60029B153 /* SymbolsDataSource.swift in Sources */, 644BD76F2A44746000A0BF99 /* QuoteViewController.swift in Sources */, 644BD7712A44746000A0BF99 /* QuoteTableViewController.swift in Sources */, 644BD75D2A44726F00A0BF99 /* AppDelegate.swift in Sources */, 644BD77C2A44746C00A0BF99 /* TimeInterval+Ext.swift in Sources */, 644BD77B2A44746C00A0BF99 /* Endpoint+Ext.swift in Sources */, 644BD77D2A44746C00A0BF99 /* MetricCell.swift in Sources */, + 64F203D22AFA461C00224A0F /* EditListViewController.swift in Sources */, + 64F203D52AFA463B00224A0F /* SearchSymbolViewController.swift in Sources */, 644BD7722A44746000A0BF99 /* QuoteModel.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -2076,10 +2091,13 @@ 64B6273B2A375C0F00196D07 /* PaddingLabel.swift in Sources */, 64B627402A375C0F00196D07 /* SceneDelegate.swift in Sources */, 6469F8D82A3B4AA400846831 /* MetricCell.swift in Sources */, + 6482D9A12AFA51B60029B153 /* SymbolsDataSource.swift in Sources */, 646D19E22A3C994000C82315 /* DXFTimer.swift in Sources */, 64B6273E2A375C0F00196D07 /* QuoteTableViewController.swift in Sources */, + 64F203D12AFA461C00224A0F /* EditListViewController.swift in Sources */, 64B627392A375C0F00196D07 /* AppDelegate.swift in Sources */, 64B627352A375C0F00196D07 /* QuoteModel.swift in Sources */, + 64F203D42AFA463B00224A0F /* SearchSymbolViewController.swift in Sources */, 64B627382A375C0F00196D07 /* QuoteViewController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; diff --git a/Samples/QuoteTableApp/Base.lproj/Main.storyboard b/Samples/QuoteTableApp/Base.lproj/Main.storyboard index 025668dc5..f98959751 100644 --- a/Samples/QuoteTableApp/Base.lproj/Main.storyboard +++ b/Samples/QuoteTableApp/Base.lproj/Main.storyboard @@ -1,5 +1,5 @@ - + @@ -104,7 +104,7 @@ - + @@ -208,6 +208,18 @@ + @@ -216,16 +228,20 @@ - + + + + + @@ -233,13 +249,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + diff --git a/Samples/QuoteTableApp/EditListViewController.swift b/Samples/QuoteTableApp/EditListViewController.swift new file mode 100644 index 000000000..7b9269622 --- /dev/null +++ b/Samples/QuoteTableApp/EditListViewController.swift @@ -0,0 +1,32 @@ +// +// EditListViewController.swift +// DXFeedFramework +// +// Created by Aleksey Kosylo on 07.11.23. +// + +import UIKit + +class EditListViewController: UIViewController { + @IBOutlet var titleLabel: UILabel! + @IBOutlet var closeButton: UIButton! + @IBOutlet var addButton: UIButton! + @IBOutlet var tableView: UITableView! + + override func viewDidLoad() { + super.viewDidLoad() + self.view.backgroundColor = .tableBackground + self.tableView.backgroundColor = .tableBackground + self.closeButton.tintColor = .white + self.addButton.tintColor = .white + self.titleLabel.textColor = .white + } + + @IBAction func close(_ sender: UISwitch) { + navigationController?.popViewController(animated: true) + } +} + +//extension EditListViewController: UITableViewDelegate, UITableViewDataSource { +// +//} diff --git a/Samples/QuoteTableApp/QuoteTableViewController.swift b/Samples/QuoteTableApp/QuoteTableViewController.swift index 4f83aca2d..60aa1a730 100644 --- a/Samples/QuoteTableApp/QuoteTableViewController.swift +++ b/Samples/QuoteTableApp/QuoteTableViewController.swift @@ -19,12 +19,13 @@ class QuoteTableViewController: UIViewController { @IBOutlet var quoteTableView: UITableView! @IBOutlet var connectionStatusLabel: UILabel! @IBOutlet var agregationSwitch: UISwitch! + @IBOutlet var editButton: UIButton! override func viewDidLoad() { super.viewDidLoad() self.view.backgroundColor = .tableBackground self.quoteTableView.backgroundColor = .tableBackground - + self.editButton.tintColor = .white quoteTableView.separatorStyle = .none self.connectionStatusLabel.text = DXEndpointState.notConnected.convetToString() } diff --git a/Samples/QuoteTableApp/SearchSymbolViewController.swift b/Samples/QuoteTableApp/SearchSymbolViewController.swift new file mode 100644 index 000000000..49fefa340 --- /dev/null +++ b/Samples/QuoteTableApp/SearchSymbolViewController.swift @@ -0,0 +1,27 @@ +// +// SearchSymbolViewController.swift +// DXFeedFramework +// +// Created by Aleksey Kosylo on 07.11.23. +// + +import UIKit + +class SearchSymbolViewController: UIViewController { + @IBOutlet var titleLabel: UILabel! + @IBOutlet var closeButton: UIButton! + @IBOutlet var addButton: UIButton! + @IBOutlet var tableView: UITableView! + + override func viewDidLoad() { + super.viewDidLoad() + self.view.backgroundColor = .tableBackground + self.tableView.backgroundColor = .tableBackground + self.closeButton.tintColor = .white + self.addButton.tintColor = .white + self.titleLabel.textColor = .white + } + @IBAction func close(_ sender: UISwitch) { + navigationController?.popViewController(animated: true) + } +} diff --git a/Samples/QuoteTableApp/SymbolsDataSource.swift b/Samples/QuoteTableApp/SymbolsDataSource.swift new file mode 100644 index 000000000..bd816a854 --- /dev/null +++ b/Samples/QuoteTableApp/SymbolsDataSource.swift @@ -0,0 +1,17 @@ +// +// SymbolsDataSource.swift +// DXFeedFramework +// +// Created by Aleksey Kosylo on 07.11.23. +// + +import Foundation + +class SymbolsDataSource { + private var symbols = [String] + + init() { + //load data + + } +}