mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-04-19 01:32:06 +00:00
Delete Source/LowContrastMode.swift
This commit is contained in:
parent
a9649c0688
commit
7b262301e2
1 changed files with 0 additions and 43 deletions
|
|
@ -1,43 +0,0 @@
|
|||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
@IBOutlet weak var textField: UITextField!
|
||||
@IBOutlet weak var colorButton: UIButton!
|
||||
|
||||
var textColor: UIColor = (red: 0.56, green: 0.56, blue: 0.56, alpha: 1.00)
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Configure Text Field
|
||||
textField.placeholder = "YouTube"
|
||||
|
||||
// Configure Color Button
|
||||
colorButton.setTitleColor(textColor, for: .normal)
|
||||
}
|
||||
|
||||
@IBAction func onColorButtonTap(_ sender: Any) {
|
||||
let colorPicker = UIColorPickerViewController()
|
||||
colorPicker.delegate = self
|
||||
present(colorPicker, animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
extension ViewController: UITextFieldDelegate {
|
||||
|
||||
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
|
||||
textField.resignFirstResponder()
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension ViewController: UIColorPickerViewControllerDelegate {
|
||||
|
||||
func colorPickerViewControllerDidSelectColor(_ viewController: UIColorPickerViewController) {
|
||||
textColor = viewController.selectedColor
|
||||
colorButton.setTitleColor(textColor, for: .normal)
|
||||
}
|
||||
|
||||
func colorPickerViewControllerDidFinish(_ viewController: UIColorPickerViewController) {
|
||||
dismiss
|
||||
Loading…
Reference in a new issue