Skip to content

PushedCrayon/DHDeclarable

 
 

Repository files navigation

  _____   _    _  _____               _                     _      _       
 |  __ \ | |  | ||  __ \             | |                   | |    | |      
 | |  | || |__| || |  | |  ___   ___ | |  __ _  _ __  __ _ | |__  | |  ___ 
 | |  | ||  __  || |  | | / _ \ / __|| | / _` || '__|/ _` || '_ \ | | / _ \
 | |__| || |  | || |__| ||  __/| (__ | || (_| || |  | (_| || |_) || ||  __/
 |_____/ |_|  |_||_____/  \___| \___||_| \__,_||_|   \__,_||_.__/ |_| \___|
 

DHDeclarable

run tests codecov GitHub license GitHub issues Twitter

🌉 A bridge from UIKit to SwiftUI

import DHDeclarable
class ViewController: DHDViewController {
    override var titled: String? { "DHDeclarable" }
    override var renderingMode: DHDViewControllerContentRenderingMode { .center }
    
    override var body: UIView {
        get {
            DHDLabel("Hello, World!")
                .tagged(viewTag)
        }
        set { super.body = newValue }
    }
}

Tired of Storyboards? Not ready for SwiftUI?

  • DHDeclarable adds declarative syntax to UIKit
  • No more assigning constraints in Interface Builder
  • One source of truth for your user interface code

Getting Started

Available as a Swift Package: https://github.com/dan-hart/DHDeclarable

"Buy Me A Coffee"

About

Declarative UIKit for iOS apps

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 100.0%