TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Sep 2017 |
SwiftSwift Version | 4.0 |
SPMSupports SPM | ✗ |
Maintained by Nathan Tannar.
For the better part of two years I have been learning Swift. During this time I used a lot of 3rd party dependencies to build out my apps. While they were useful for getting started, I wanted to dive deeper and create my own set of components that would have the essentials I would need to develop apps moving forward.
I faced an ongoing problem of always having to set the tint color, font choice and general defaults for every project. To solve this I made NTComponents
. A set of classes that will inherit defaults defined in AppDelegate
. This grew into also adding useful extensions, models and custom views simplify app creation while maintaining great UI/UX.
Hit that star button to show your support!
While NTComponents has yet to be fully documented, you can find the docs here: https://nathantannar.me/NTComponents/docs/
NTComponents.xcproject
I would recommend taking a look at the sample code that generates the NTComponents Demo
app. Also try taking a look at the Jazzy generated Docs(https://nathantannar.me/NTComponents/docs/)! While they are not complete yet I plan to work on documentation.
import NTComponents
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
// Set color defaults
Color.Default.setPrimary(to: .white)
Color.Default.setSecondary(to: .red)
Color.Default.Text.Title = .blue
// If you want the shadow to be more standard
Color.Default.setCleanShadow()
// Set your font defaults
Font.Default.Title = Font.Roboto.Medium.withSize(15)
Font.Default.Subtitle = Font.Roboto.Regular
Font.Default.Body = Font.Roboto.Regular.withSize(13)
return true
}
// More standard AppDelegate methods
}
We would love for you to contribute to NTComponents
with more useful extensions, models or UI classes. If interested please contact myself.
Find a bug? Please feel free to let me know!
I would like to thank the following open source developers. Some of which I either drew inspiration upon or reworked their code into NTComponents
Brian Voong - https://github.com/bhlvoong/LBTAComponents
Raul Riera - https://github.com/raulriera/TextFieldEffects
patchthecode - https://github.com/patchthecode/JTAppleCalendar
Zheng-Xiang Ke - https://github.com/kf99916/TimelineTableViewCell
Ryo Aoyama - https://github.com/ra1028/Former
Amornchai Kanokpullwad - https://github.com/zoonooz/ZFRippleButton
And to all of the contributors on StackOverflow
Distributed under the MIT license. See LICENSE
for more information.