Skip to content

Commit

Permalink
set default color in UI
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Sep 21, 2023
1 parent d1dce49 commit d10b5b9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
4 changes: 4 additions & 0 deletions DXFeedFramework.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
64104FCC2A2629D800D1FC41 /* NativeSubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64104FCB2A2629D800D1FC41 /* NativeSubscription.swift */; };
64104FD32A277B2D00D1FC41 /* ListNative.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64104FD22A277B2D00D1FC41 /* ListNative.swift */; };
64125E362A1F689A00FB32BA /* libDxFeedGraalNativeSdk.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 64125E352A1F689A00FB32BA /* libDxFeedGraalNativeSdk.dylib */; platformFilters = (macos, ); settings = {ATTRIBUTES = (Required, ); }; };
64148B6F2ABC2F790063110E /* Colors.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 646979712A3B5AF60003A9BA /* Colors.xcassets */; };
64148B702ABC2F7C0063110E /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6469F8D22A3B401700846831 /* Colors.swift */; };
6417DD192A39C22C008912D6 /* DXFeedFramework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 803BAC0D29BFA50700FFAB1C /* DXFeedFramework.framework */; };
6417DD1A2A39C22C008912D6 /* DXFeedFramework.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 803BAC0D29BFA50700FFAB1C /* DXFeedFramework.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
6417DD232A39CAB2008912D6 /* Diagnostic.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6417DD1E2A39C9A7008912D6 /* Diagnostic.swift */; };
Expand Down Expand Up @@ -1576,6 +1578,7 @@
buildActionMask = 2147483647;
files = (
64B4365A2AB9D3470003919E /* LaunchScreen.storyboard in Resources */,
64148B6F2ABC2F790063110E /* Colors.xcassets in Resources */,
64B436572AB9D3470003919E /* Assets.xcassets in Resources */,
64B436552AB9D3410003919E /* Main.storyboard in Resources */,
);
Expand Down Expand Up @@ -1741,6 +1744,7 @@
buildActionMask = 2147483647;
files = (
64B436522AB9D3410003919E /* ViewController.swift in Sources */,
64148B702ABC2F7C0063110E /* Colors.swift in Sources */,
64B4364E2AB9D3410003919E /* AppDelegate.swift in Sources */,
64B436502AB9D3410003919E /* SceneDelegate.swift in Sources */,
);
Expand Down
21 changes: 19 additions & 2 deletions Samples/ScheduleSampleApp/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,23 @@ class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()

activityIndicator.color = .white

view.backgroundColor = .tableBackground
resultTextView.backgroundColor = .tableBackground

func changeAppereance(_ textField: UITextField) {
textField.backgroundColor = .priceBackground
textField.textColor = .white
textField.layer.cornerRadius = 10
textField.clipsToBounds = true
}

changeAppereance(timeTextField)
changeAppereance(symbolTextField)
resultTextView.textColor = .white

activityIndicator.isHidden = true
timeTextField.text = dateFormater.string(from: Date.now)
// Do any additional setup after loading the view.
Expand All @@ -43,7 +60,7 @@ class ViewController: UIViewController {
}
activityIndicator.isHidden = false
activityIndicator.startAnimating()

resultTextView.text = ""
DispatchQueue.global(qos: .background).async {
do {
let profile = DXInstrumentProfileReader()
Expand Down Expand Up @@ -97,7 +114,7 @@ class ViewController: UIViewController {
let schedule = try DXSchedule(instrumentProfile: profile)
let session = try schedule.getSessionByTime(time: time)
let nextTradingSession = session.isTrading ? session : try session.getNext(filter: .trading)
let nearestSession = try schedule.getNearestSessionByTime(time: getCurrentTime(), filter: .trading)
let nearestSession = try schedule.getNearestSessionByTime(time: time, filter: .trading)

func sessionDescription(_ session: ScheduleSession?) -> String {
guard let session = session else {
Expand Down

0 comments on commit d10b5b9

Please sign in to comment.