Repository navigation
Ready to beat SwiftUI
Hurray, I made UIKitPlus even more powerful than before! It is updated to Swift 5.2 and Xcode 11.4!
For those who doesn't know what is UIKitPlus
It is complex production-ready solution for easy building amazing UI on UIKit.
This is a UIKit-wrapper which makes is declarative, allows to add subviews in SwiftUI style, and gives the most beautiful way to declare constraints! So no more need inSnapKitor its clones! Even more, constraints may be set in advance anywhere, so before you add view to superview! 🚀
You can start using it today even for one or two views. Just try it and you will never want to go back! 🤷
I refactored and updated EXAMPLE PROJECT so now LivePreview works in every file just like in SwiftUI!
In the library's readme you will find detailed examples for everything, bu here I want to highlight some awesome bonus features:
- easily declare dynamic colors for dark/light modes
let titleColor: UIColor = .black / .white // second color is for dark mode (works automatically ofc)-
root view controller
This view controller you could use as enter point to the app and inside it declare routes to other view controllers and its transitions. It gives an ability to easily switch between controllers and support deep links.
Documentation is here -
localize your strings easily
String(.en("Hello"),
.fr("Bonjour"),
.ru("Привет"),
.es("Hola"),
.zh_Hans("你好"),
.ja("こんにちは"))- build attributed strings easily
"Hello".foreground(.darkGrey).font(.articoRegular, 15)- and even concatenate them easily
"Hello ".foreground(.green).font(.articoRegular, 15) + "world".foreground(.red).font(.articoRegular, 15)- format textfields easily! example with AnyFormatKit lib
static var phone: TextField {
TextField()
.content(.telephoneNumber)
.autocapitalization(.none)
.autocorrection(.no)
.keyboard(.phonePad)
.font(.articoRegular, 15)
.placeholder("(555) 123-4567".foreground(.darkGrey).font(.articoRegular, 15))
.color(.blackHole)
.height(18)
.formatCharacters { textView, range, text in
// here we use `AnyFormatKit`
let phoneFormatter = DefaultTextInputFormatter(textPattern: "(###) ###-####")
let result = phoneFormatter.formatInput(currentText: textView.text ?? "", range: range, replacementString: text)
textView.text = result.formattedText
}
}and even more cool, beautiful and convenience features ❤️ because I'm writing this lib for myself and just would love to share it with you 😃
If you will use it please don't hesitate to ask me any questions! I'm ready to help with anything!
You have a lot of ways to get help:
- file an issue here
- write me in Discord directly to
iMike#3049 - write me in Discord in #ios channel on Vapor Discord server
- write me in Discord in #uikitplus channel in Swift Stream Discord server