Merge pull request #1 from crelies/dev chore(license): added missing license file
Merge pull request #1 from crelies/dev
chore(license): added missing license file
SwiftUI-like modifiers for many UIKit views and controls - syntactic sugar, nothing more 🎁
Let me know if you miss something 😉
Hint: To avoid conflicts with existing functions I had to use different function signatures for some modifiers!
The modifiers are added through Extensions to the views / controls.
If you create your views in code you may find yourself writing something similar to
var textField: UITextField = { let textField = UITextField() textField.translatesAutoresizingMaskIntoConstraints = false textField.placeholder = "Username" textField.textColor = .systemBlue textField.font = .systemFont(ofSize: 17, weight: .semibold) textField.textContentType = .username return textField }()
With this Swift package you can use SwiftUI-like modifiers
var textField: UITextField = { UITextField() .translatesAutoresizingMaskIntoConstraints(false) .placeholder("Username") .textColor(.systemBlue) .font(.systemFont(ofSize: 17, weight: .semibold)) .textContentType(.username) }()
Enjoy adding some syntactic sugar on top of your UIKit code 🚀
Add this Swift package as a dependency to your Package.swift
.package(url: "https://github.com/crelies/UIKit-Modifiers.git", from: "0.1.0")
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
UIKit-Modifiers
SwiftUI-like modifiers for many UIKit views and controls - syntactic sugar, nothing more 🎁
Let me know if you miss something 😉
Hint: To avoid conflicts with existing functions I had to use different function signatures for some modifiers!
Modifiers available for
The modifiers are added through Extensions to the views / controls.
Example
If you create your views in code you may find yourself writing something similar to
With this Swift package you can use SwiftUI-like modifiers
Enjoy adding some syntactic sugar on top of your UIKit code 🚀
Installation
Add this Swift package as a dependency to your Package.swift