Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Scribe/InstallationTab/DownloadDataVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import UIKit

// class DownloadDataVC: UIViewController {
class DownloadDataVC: UIViewController {
// @IBOutlet var outerTable: UITableView!
//
// let tableData = DownloadDataTable.downloadDataTable
Expand Down Expand Up @@ -48,7 +48,7 @@ import UIKit
//
// return cell
// }
// }
}
//

// MARK: UITableViewDelegate
Expand Down
23 changes: 23 additions & 0 deletions Scribe/InstallationTab/InstallationVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ class InstallationVC: UIViewController {

@IBOutlet var installationHeaderLabel: UILabel!

@IBOutlet var downloadKeyboardBtnPhone: UIButton!
@IBOutlet var downloadKeyboardBtnPad: UIButton!
var downloadKeyboardBtn: UIButton!

private let installationTipCardState: Bool = {
let userDefault = UserDefaults.standard
let state = userDefault.object(forKey: "installationTipCardState") as? Bool ?? true
Expand All @@ -54,12 +58,14 @@ class InstallationVC: UIViewController {
settingsBtn = settingsBtnPad
settingsCorner = settingsCornerPad
settingCornerWidthConstraint = settingCornerWidthConstraintPad
downloadKeyboardBtn = downloadKeyboardBtnPad

appTextViewPhone.removeFromSuperview()
appTextBackgroundPhone.removeFromSuperview()
topIconPhone.removeFromSuperview()
settingsBtnPhone.removeFromSuperview()
settingsCornerPhone.removeFromSuperview()

} else {
appTextView = appTextViewPhone
appTextBackground = appTextBackgroundPhone
Expand All @@ -73,6 +79,7 @@ class InstallationVC: UIViewController {
topIconPad.removeFromSuperview()
settingsBtnPad.removeFromSuperview()
settingsCornerPad.removeFromSuperview()

}
}

Expand Down Expand Up @@ -148,6 +155,15 @@ class InstallationVC: UIViewController {
settingsBtn.addTarget(self, action: #selector(keyTouchDown), for: .touchDown)
}

func setDownloadKeyboardBtn() {
downloadKeyboardBtn.setTitle(NSLocalizedString("app.installation.download", value: "Download Keyboard", comment: ""), for: .normal)
downloadKeyboardBtn.setTitleColor(.white, for: .normal)
downloadKeyboardBtn.backgroundColor = scribeCTAColor
downloadKeyboardBtn.titleLabel?.font = UIFont.systemFont(ofSize: fontSize * 0.9, weight: .medium)
downloadKeyboardBtn.clipsToBounds = true
downloadKeyboardBtn.addTarget(self, action: #selector(handleDownloadKeyboard), for: .touchUpInside)
}

/// Sets constant properties for the app screen.
func setUIConstantProperties() {
// Set the scroll bar so that it appears on a white background regardless of light or dark mode.
Expand Down Expand Up @@ -246,6 +262,7 @@ class InstallationVC: UIViewController {
setUIConstantProperties()
setUIDeviceProperties()
setInstallationUI()
setDownloadKeyboardBtn()
}

/// Function to open the settings app that is targeted by settingsBtn.
Expand All @@ -256,6 +273,12 @@ class InstallationVC: UIViewController {
UIApplication.shared.open(settingsURL)
}

/// Function to link download data button
@objc func handleDownloadKeyboard() {
let downloadVC = DownloadDataVC()
navigationController?.pushViewController(downloadVC, animated: true)
}

/// Function to change the key coloration given a touch down.
///
/// - Parameters
Expand Down
Loading