diff --git a/Scribe.xcodeproj/project.pbxproj b/Scribe.xcodeproj/project.pbxproj index 72f3d7d2..d1e00edb 100644 --- a/Scribe.xcodeproj/project.pbxproj +++ b/Scribe.xcodeproj/project.pbxproj @@ -995,6 +995,7 @@ children = ( 14AC56832A24AED3006B1DDF /* AboutViewController.swift */, 1406B7862A2DFCDD001DF45B /* AboutTableData.swift */, + 14AC56892A261663006B1DDF /* InformationScreenVC.swift */, ); path = AboutTab; sourceTree = ""; @@ -1008,14 +1009,6 @@ path = SettingsTab; sourceTree = ""; }; - 14AC568D2A262EE5006B1DDF /* ViewControllers */ = { - isa = PBXGroup; - children = ( - 14AC56892A261663006B1DDF /* InformationScreenVC.swift */, - ); - path = ViewControllers; - sourceTree = ""; - }; 30453961293B9D05003AE55B /* ToolTip */ = { isa = PBXGroup; children = ( @@ -1088,7 +1081,6 @@ 147797B62A2CFB560044A53E /* SettingsTab */, 147797A92A2CD2B50044A53E /* AboutTab */, D1A2DCAF27AD378F0057A10D /* AppTexts */, - 14AC568D2A262EE5006B1DDF /* ViewControllers */, 1406B7832A2DFCA2001DF45B /* Components */, 147797B22A2CD5AB0044A53E /* ParentTableCellModel.swift */, 38BD213322D5907F00C6795D /* AppDelegate.swift */, diff --git a/Scribe/AboutTab/InformationScreenVC.swift b/Scribe/AboutTab/InformationScreenVC.swift new file mode 100644 index 00000000..2629deb9 --- /dev/null +++ b/Scribe/AboutTab/InformationScreenVC.swift @@ -0,0 +1,73 @@ +// +// InformationScreenVC.swift +// + +import UIKit + +class InformationScreenVC: UIViewController { + @IBOutlet var headingLabel: UILabel! + @IBOutlet var textView: UITextView! + @IBOutlet var scrollContainerView: UIView! + @IBOutlet var contentContainerView: UIView! + + @IBOutlet var cornerImageView: UIImageView! + @IBOutlet var iconImageView: UIImageView! + + var text: String = "" + var screenTitle: String = "" + var section: SectionState = .privacyPolicy + + override func viewDidLoad() { + super.viewDidLoad() + + setupInformationPageUI() + + if section == .privacyPolicy { + setupPrivacyPolicyPage() + } + } + + func setupInformationPageUI() { + scrollContainerView.backgroundColor = .clear + + textView.backgroundColor = UIColor(named: "commandBar") + contentContainerView.backgroundColor = UIColor(named: "commandBar") + applyCornerRadius(elem: contentContainerView, radius: contentContainerView.frame.width * 0.05) + applyShadowEffects(elem: contentContainerView) + + cornerImageView.clipsToBounds = true + contentContainerView.clipsToBounds = true + + textView.isEditable = false + } + + func setupPrivacyPolicyPage() { + switch Locale.userSystemLanguage { + case "EN": + navigationItem.title = enPrivacyPolicyTitle + headingLabel.attributedText = NSMutableAttributedString( + string: enPrivacyPolicyPageCaption, + attributes: [NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: fontSize * 1.2)] + ) + textView.attributedText = setPrivacyPolicy(fontSize: fontSize, text: enPrivacyPolicyText) + case "DE": + navigationItem.title = dePrivacyPolicyTitle + headingLabel.attributedText = NSMutableAttributedString( + string: dePrivacyPolicyPageCaption, + attributes: [NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: fontSize * 1.2)] + ) + textView.attributedText = setPrivacyPolicy(fontSize: fontSize, text: dePrivacyPolicyText) + + default: + navigationItem.title = enPrivacyPolicyTitle + headingLabel.attributedText = NSMutableAttributedString( + string: enPrivacyPolicyPageCaption, + attributes: [NSAttributedString.Key.font : UIFont.boldSystemFont(ofSize: fontSize * 1.2)] + ) + textView.attributedText = setPrivacyPolicy(fontSize: fontSize, text: enPrivacyPolicyText) + } + textView.textColor = keyCharColor + iconImageView.image = UIImage(systemName: "lock.shield") + iconImageView.tintColor = keyCharColor + } +} diff --git a/Scribe/AppExtensions.swift b/Scribe/AppExtensions.swift index 644b5417..f4717c9f 100644 --- a/Scribe/AppExtensions.swift +++ b/Scribe/AppExtensions.swift @@ -23,3 +23,9 @@ extension UIView { return nil } } + +extension Locale { + static var userSystemLanguage: String { + return String(Locale.preferredLanguages[0].prefix(2)).uppercased() + } +} diff --git a/Scribe/AppTexts/AppTextStyling.swift b/Scribe/AppTexts/AppTextStyling.swift index d0fb1103..1864794c 100644 --- a/Scribe/AppTexts/AppTextStyling.swift +++ b/Scribe/AppTexts/AppTextStyling.swift @@ -75,11 +75,7 @@ func getGlobeIcon(fontSize: CGFloat) -> NSAttributedString { } /// Formats and returns the text of the Scribe privacy policy with links activated. -func setPrivacyPolicy(fontSize: CGFloat, title: String, text: String) -> NSMutableAttributedString { - let privacyTextTitle = NSMutableAttributedString( - string: title, attributes: [NSAttributedString.Key.font: UIFont.boldSystemFont(ofSize: fontSize * 1.2)] - ) - +func setPrivacyPolicy(fontSize: CGFloat, text: String) -> NSMutableAttributedString { let wikidataDataLicensing = "https://www.wikidata.org/wiki/Wikidata:Licensing" let wikipediaDataLicensing = "https://en.wikipedia.org/wiki/Wikipedia:Reusing_Wikipedia_content" let unicodeDataLicense = "https://www.unicode.org/license.txt" @@ -106,8 +102,5 @@ func setPrivacyPolicy(fontSize: CGFloat, title: String, text: String) -> NSMutab fontSize: fontSize ) - return concatAttributedStrings( - left: privacyTextTitle, - right: privacyPolicyTextWithLinks - ) + return privacyPolicyTextWithLinks } diff --git a/Scribe/AppTexts/English/ENPrivacyPolicy.swift b/Scribe/AppTexts/English/ENPrivacyPolicy.swift index 700c6228..b27f035e 100644 --- a/Scribe/AppTexts/English/ENPrivacyPolicy.swift +++ b/Scribe/AppTexts/English/ENPrivacyPolicy.swift @@ -7,12 +7,12 @@ // let enPrivacyPolicyTitle = "Privacy Policy" +let enPrivacyPolicyPageCaption = "Keeping you safe" // swiftlint:disable all // Includes a new line so that there is space between it and the page title. let enPrivacyPolicyText = """ -\n Please note that the English version of this policy takes precedence over all other versions. The Scribe developers (SCRIBE) built the iOS application "Scribe - Language Keyboards" (SERVICE) as an open-source application. This SERVICE is provided by SCRIBE at no cost and is intended for use as is. diff --git a/Scribe/AppTexts/German/DEPrivacyPolicy.swift b/Scribe/AppTexts/German/DEPrivacyPolicy.swift index 430f3375..c3b590c8 100644 --- a/Scribe/AppTexts/German/DEPrivacyPolicy.swift +++ b/Scribe/AppTexts/German/DEPrivacyPolicy.swift @@ -7,6 +7,7 @@ // let dePrivacyPolicyTitle = "Datenschutzrichtlinie" +let dePrivacyPolicyPageCaption = "Wir sorgen für Ihre Sicherheit" // swiftlint:disable all diff --git a/Scribe/Base.lproj/AppScreen.storyboard b/Scribe/Base.lproj/AppScreen.storyboard index e4eedc08..871eac93 100644 --- a/Scribe/Base.lproj/AppScreen.storyboard +++ b/Scribe/Base.lproj/AppScreen.storyboard @@ -50,38 +50,105 @@ - - - - - + + + + + + + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + + + + - - + + + + + + - + @@ -99,10 +166,10 @@ - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - - + - - - - - - - - - - - - - + + - - - - - - - - - - + + + + - + @@ -443,13 +404,11 @@ - - @@ -471,14 +430,5 @@ - - - - - - - - - diff --git a/Scribe/Components/ParentTableViewCell/ParentTableViewCell.swift b/Scribe/Components/ParentTableViewCell/ParentTableViewCell.swift index 964ad954..ee4f32b5 100644 --- a/Scribe/Components/ParentTableViewCell/ParentTableViewCell.swift +++ b/Scribe/Components/ParentTableViewCell/ParentTableViewCell.swift @@ -38,10 +38,8 @@ class ParentTableViewCell: UITableViewCell { } func setContainerViewUI() { - let containerViewHeightWidthRatio = containerView.frame.height / containerView.frame.width - - containerView.layer.cornerRadius = 36 * containerViewHeightWidthRatio - innerTable.layer.cornerRadius = 36 * containerViewHeightWidthRatio + containerView.layer.cornerRadius = containerView.frame.width * 0.05 + innerTable.layer.cornerRadius = innerTable.frame.width * 0.05 innerTable.clipsToBounds = true applyShadowEffects(elem: containerView) } @@ -72,8 +70,6 @@ extension ParentTableViewCell: UITableViewDataSource { /// Function implementation conforming to the UITableViewDelegate protocol. extension ParentTableViewCell: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { - print(data?.section[indexPath.row].sectionTitle ?? "") - if let section = data?.section[indexPath.row] { switch section.sectionState { case .github: @@ -95,8 +91,10 @@ extension ParentTableViewCell: UITableViewDelegate { // // reset functionality // print("Resets app hints") case .privacyPolicy: - // Push a new screen - print("Scribe privacy policy page") + if let viewController = parentViewController?.storyboard?.instantiateViewController(identifier: "InformationScreenVC") as? InformationScreenVC { + parentViewController?.navigationController?.pushViewController(viewController, animated: true) + viewController.section = .privacyPolicy + } case .licenses: // Push a new screen print("Licenses page") @@ -142,6 +140,7 @@ extension ParentTableViewCell: UITableViewDelegate { let mailComposeViewController = MFMailComposeViewController() mailComposeViewController.mailComposeDelegate = self mailComposeViewController.setToRecipients(["scribe.language@gmail.com"]) + mailComposeViewController.setSubject("Hey Scribe!") parentViewController?.present(mailComposeViewController, animated: true, completion: nil) } else { diff --git a/Scribe/InstallationTab/InstallationVC.swift b/Scribe/InstallationTab/InstallationVC.swift index ac08f3e8..32c3a76a 100644 --- a/Scribe/InstallationTab/InstallationVC.swift +++ b/Scribe/InstallationTab/InstallationVC.swift @@ -17,27 +17,9 @@ class InstallationVC: UIViewController { @IBOutlet var topIconPad: UIImageView! @IBOutlet var settingsCorner: UIImageView! - @IBOutlet var GHTextView: UITextView! - @IBOutlet var GHTextBackground: UIView! - - @IBOutlet var GHBtn: UIButton! - @IBOutlet var GHCorner: UIImageView! - - @IBOutlet var privacyTextBackground: UIView! - @IBOutlet var privacyTextView: UITextView! - @IBOutlet var privacyScroll: UIImageView! - - @IBOutlet var switchView: UIButton! - @IBOutlet var switchViewBackground: UIView! - var displayPrivacyPolicy = false - // Spacing views to size app screen proportionally. @IBOutlet var topSpace: UIView! @IBOutlet var logoSpace: UIView! - @IBOutlet var svSpace: UIView! - @IBOutlet var bottomSpace: UIView! - - let userSystemLanguage = String(Locale.preferredLanguages[0].prefix(2)).uppercased() /// Includes a call to checkDarkModeSetColors to set brand colors and a call to set the UI for the app screen. override func viewDidLoad() { @@ -92,54 +74,20 @@ class InstallationVC: UIViewController { } } - let switchViewColor = UIColor(named: "scribeCTA") - - /// Sets the functionality of the button that switches between installation instructions and the privacy policy. - func setSwitchViewBtn() { - if !displayPrivacyPolicy { - switchView.setTitle(userSystemLanguage == "DE" ? "Datenschutzrichtlinie ansehen" : "View privacy policy", for: .normal) - } else if displayPrivacyPolicy { - switchView.setTitle(userSystemLanguage == "DE" ? "Installation ansehen" : "View installation", for: .normal) - } - switchView.contentHorizontalAlignment = UIControl.ContentHorizontalAlignment.center - switchView.setTitleColor(.init(.keyChar), for: .normal) - switchView.titleLabel?.font = .systemFont(ofSize: fontSize * 1.5, weight: .semibold) - - switchView.clipsToBounds = true - switchView.backgroundColor = switchViewColor - applyCornerRadius(elem: switchView, radius: switchView.frame.height * 0.35) - applyShadowEffects(elem: switchView) - - switchView.addTarget(self, action: #selector(switchAppView), for: .touchUpInside) - switchView.addTarget(self, action: #selector(keyTouchDown), for: .touchDown) - - // Add a white background so that the key press doesn't show the blue app screen background. - switchViewBackground.backgroundColor = .white - switchViewBackground.clipsToBounds = true - applyCornerRadius(elem: switchViewBackground, radius: switchView.frame.height * 0.35) - } - /// Sets the functionality of the button over the keyboard installation guide that opens Settings. func setSettingsBtn() { settingsBtn.addTarget(self, action: #selector(openSettingsApp), for: .touchUpInside) settingsBtn.addTarget(self, action: #selector(keyTouchDown), for: .touchDown) } - /// Sets the functionality of the button over the keyboard installation guide that links to Scribe's GitHub. - func setGHBtn() { - GHBtn.addTarget(self, action: #selector(openScribeGH), for: .touchUpInside) - GHBtn.addTarget(self, action: #selector(keyTouchDown), for: .touchDown) - } - /// 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. let scrollbarAppearance = UINavigationBarAppearance() scrollbarAppearance.configureWithOpaqueBackground() - privacyScroll.isUserInteractionEnabled = false // Disable spacing views. - let allSpacingViews: [UIView] = [topSpace, logoSpace, svSpace, bottomSpace] + let allSpacingViews: [UIView] = [topSpace, logoSpace] for view in allSpacingViews { view.isUserInteractionEnabled = false view.backgroundColor = .clear @@ -151,26 +99,16 @@ class InstallationVC: UIViewController { /// Sets properties for the app screen given the current device. func setUIDeviceProperties() { - // Height ratios to set corner radii exactly. - let installTextToSwitchBtnHeightRatio = appTextBackground.frame.height / switchViewBackground.frame.height - let GHTextToSwitchBtnHeightRatio = GHTextBackground.frame.height / switchViewBackground.frame.height - let privacyTextToSwitchBtnHeightRatio = privacyTextBackground.frame.height / switchViewBackground.frame.height - settingsCorner.layer.maskedCorners = .layerMaxXMinYCorner - settingsCorner.layer.cornerRadius = appTextBackground.frame.height * 0.4 / installTextToSwitchBtnHeightRatio + settingsCorner.layer.cornerRadius = appTextBackground.frame.width * 0.05 settingsCorner.alpha = 0.9 - GHCorner.layer.maskedCorners = .layerMaxXMinYCorner - GHCorner.layer.cornerRadius = GHTextBackground.frame.height * 0.4 / GHTextToSwitchBtnHeightRatio - GHCorner.alpha = 0.9 + settingsBtn.titleLabel?.text = "" settingsBtn.clipsToBounds = true settingsBtn.layer.masksToBounds = false - settingsBtn.layer.cornerRadius = appTextBackground.frame.height * 0.4 / installTextToSwitchBtnHeightRatio - GHBtn.clipsToBounds = true - GHBtn.layer.masksToBounds = false - GHBtn.layer.cornerRadius = GHTextBackground.frame.height * 0.4 / GHTextToSwitchBtnHeightRatio + settingsBtn.layer.cornerRadius = appTextBackground.frame.width * 0.05 - let allTextViews: [UITextView] = [appTextView, GHTextView, privacyTextView] + let allTextViews: [UITextView] = [appTextView] // Disable text views. for textView in allTextViews { @@ -180,24 +118,11 @@ class InstallationVC: UIViewController { } // Set backgrounds and corner radii. - appTextBackground.isUserInteractionEnabled = false + appTextBackground.isUserInteractionEnabled = true appTextBackground.clipsToBounds = true applyCornerRadius( elem: appTextBackground, - radius: appTextBackground.frame.height * 0.4 / installTextToSwitchBtnHeightRatio - ) - - GHTextBackground.isUserInteractionEnabled = false - GHTextBackground.clipsToBounds = true - applyCornerRadius( - elem: GHTextBackground, - radius: GHTextBackground.frame.height * 0.4 / GHTextToSwitchBtnHeightRatio - ) - - privacyTextView.backgroundColor = .clear - applyCornerRadius( - elem: privacyTextBackground, - radius: privacyTextBackground.frame.height * 0.4 / privacyTextToSwitchBtnHeightRatio + radius: appTextBackground.frame.width * 0.05 ) // Set link attributes for all textViews. @@ -222,86 +147,25 @@ class InstallationVC: UIViewController { appTextBackground.backgroundColor = UIColor(named: "commandBar") applyShadowEffects(elem: appTextBackground) - GHBtn.isUserInteractionEnabled = true - GHCorner.isHidden = false - GHTextBackground.backgroundColor = UIColor(named: "commandBar") - applyShadowEffects(elem: GHTextBackground) - - // Disable the privacy policy elements. - privacyTextView.isUserInteractionEnabled = false - privacyTextView.backgroundColor = .clear - privacyTextView.text = "" - privacyTextBackground.backgroundColor = .clear - - privacyScroll.isHidden = true - // Set the texts for the fields. - switch userSystemLanguage { + switch Locale.userSystemLanguage { case "EN": appTextView.attributedText = setENInstallation(fontSize: fontSize) - GHTextView.attributedText = setENGitHubText(fontSize: fontSize) case "DE": appTextView.attributedText = setDEInstallation(fontSize: fontSize) - GHTextView.attributedText = setDEGitHubText(fontSize: fontSize) default: appTextView.attributedText = setENInstallation(fontSize: fontSize) - GHTextView.attributedText = setENGitHubText(fontSize: fontSize) } appTextView.textColor = .init(.keyChar) - GHTextView.textColor = .init(.keyChar) - } - - /// Sets the necessary properties for the privacy policy UI including calling the text generation function. - func setPrivacyUI() { - let privacySymbol: UIImage = getPrivacySymbol(fontSize: fontSize * 0.9) - topIconPhone.image = privacySymbol - topIconPad.image = privacySymbol - topIconPhone.tintColor = .init(.keyChar) - topIconPad.tintColor = .init(.keyChar) - - // Disable installation directions and GitHub notice elements. - settingsBtn.isUserInteractionEnabled = false - appTextView.text = "" - appTextBackground.backgroundColor = .clear - - GHBtn.isUserInteractionEnabled = false - GHCorner.isHidden = true - GHTextView.text = "" - GHTextBackground.backgroundColor = .clear - - // Enable the privacy policy elements. - privacyTextView.isUserInteractionEnabled = true - privacyTextBackground.backgroundColor = UIColor(named: "commandBar") - applyShadowEffects(elem: privacyTextBackground) - - privacyScroll.isHidden = false - - switch userSystemLanguage { - case "EN": - privacyTextView.attributedText = setPrivacyPolicy( - fontSize: fontSize, title: enPrivacyPolicyTitle, text: enPrivacyPolicyText - ) - - case "DE": - privacyTextView.attributedText = setPrivacyPolicy( - fontSize: fontSize, title: dePrivacyPolicyTitle, text: dePrivacyPolicyText - ) - - default: - privacyTextView.attributedText = setPrivacyPolicy( - fontSize: fontSize, title: enPrivacyPolicyTitle, text: enPrivacyPolicyText - ) - } - privacyTextView.textColor = .init(.keyChar) } /// Creates the current app UI by applying constraints and calling child UI functions. func setCurrentUI() { // Sets the font size for the text in the app screen and corresponding UIImage icons. if DeviceType.isPhone { - if userSystemLanguage == "DE" { + if Locale.userSystemLanguage == "DE" { fontSize = UIScreen.main.bounds.height / 61 } else { fontSize = UIScreen.main.bounds.height / 59 @@ -310,27 +174,10 @@ class InstallationVC: UIViewController { fontSize = UIScreen.main.bounds.height / 53 } setTopIcon() - setSwitchViewBtn() setSettingsBtn() - setGHBtn() setUIConstantProperties() setUIDeviceProperties() - - if !displayPrivacyPolicy { - setInstallationUI() - } else { - setPrivacyUI() - } - } - - /// Switches the view of the app based on the current view. - @objc func switchAppView() { - if !displayPrivacyPolicy { - displayPrivacyPolicy = true - } else { - displayPrivacyPolicy = false - } - setCurrentUI() + setInstallationUI() } /// Function to open the settings app that is targeted by settingsBtn. @@ -338,38 +185,18 @@ class InstallationVC: UIViewController { UIApplication.shared.open(URL(string: UIApplication.openSettingsURLString)!) } - /// Function to open Scribe's GitHub page that is targeted by GHBtn. - @objc func openScribeGH() { - guard let url = URL(string: "https://github.com/scribe-org/Scribe-iOS") else { - return - } - - UIApplication.shared.open(url, options: [:], completionHandler: nil) - } - /// Function to change the key coloration given a touch down. /// /// - Parameters /// - sender: the button that has been pressed. @objc func keyTouchDown(_ sender: UIButton) { - if sender == switchView { - sender.backgroundColor = .clear - sender.setTitleColor(switchViewColor, for: .normal) - - // Bring sender's background and text colors back to their original values. - DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) { [self] in - sender.backgroundColor = switchViewColor - sender.setTitleColor(.init(.keyChar).light, for: .normal) - } - } else { - sender.backgroundColor = .black - sender.alpha = 0.2 + sender.backgroundColor = .black + sender.alpha = 0.2 - // Bring sender's opacity back up to fully opaque and replace the background color. - DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) { - sender.backgroundColor = .clear - sender.alpha = 1.0 - } + // Bring sender's opacity back up to fully opaque and replace the background color. + DispatchQueue.main.asyncAfter(deadline: .now() + 0.15) { + sender.backgroundColor = .clear + sender.alpha = 1.0 } } } diff --git a/Scribe/ParentTableCellModel.swift b/Scribe/ParentTableCellModel.swift index 56f2bd35..6c618d0d 100644 --- a/Scribe/ParentTableCellModel.swift +++ b/Scribe/ParentTableCellModel.swift @@ -11,23 +11,23 @@ struct ParentTableCellModel { } struct Section { - enum SectionState { - case github - case matrix - case wikimedia - case shareScribe - case rateScribe - case bugReport - case email -// case appHints - case privacyPolicy - case licenses - case appLang - case specificLang - } - let sectionTitle: String let imageString: String let hasToggle: Bool let sectionState: SectionState } + +enum SectionState { + case github + case matrix + case wikimedia + case shareScribe + case rateScribe + case bugReport + case email +// case appHints + case privacyPolicy + case licenses + case appLang + case specificLang +} diff --git a/Scribe/SettingsTab/SettingsViewController.swift b/Scribe/SettingsTab/SettingsViewController.swift index 304e81ec..c7ee4feb 100644 --- a/Scribe/SettingsTab/SettingsViewController.swift +++ b/Scribe/SettingsTab/SettingsViewController.swift @@ -40,8 +40,8 @@ class SettingsViewController: UIViewController { footerButton.setTitle("Install keyboard", for: .normal) footerButton.titleLabel?.font = .systemFont(ofSize: fontSize * 1.5, weight: .bold) - footerFrame.layer.cornerRadius = footerFrame.frame.height * 0.3 - footerButton.layer.cornerRadius = footerFrame.frame.height * 0.3 + footerFrame.layer.cornerRadius = footerFrame.frame.width * 0.05 + footerButton.layer.cornerRadius = footerFrame.frame.width * 0.05 footerButton.clipsToBounds = true } } diff --git a/Scribe/ViewControllers/InformationScreenVC.swift b/Scribe/ViewControllers/InformationScreenVC.swift deleted file mode 100644 index 168aaf80..00000000 --- a/Scribe/ViewControllers/InformationScreenVC.swift +++ /dev/null @@ -1,21 +0,0 @@ -// -// InformationScreenVC.swift -// - -import UIKit - -class InformationScreenVC: UIViewController { - @IBOutlet var headingLabel: UILabel! - @IBOutlet var spacer: UIView! - - var text: String = "" - var screenTitle: String = "" - - override func viewDidLoad() { - super.viewDidLoad() - - navigationItem.title = screenTitle - headingLabel.text = text - spacer.backgroundColor = .clear - } -}