DHDeclarable

main

Declarative UIKit for iOS apps
dan-hart/DHDeclarable
  _____   _    _  _____               _                     _      _       
 |  __ \ | |  | ||  __ \             | |                   | |    | |      
 | |  | || |__| || |  | |  ___   ___ | |  __ _  _ __  __ _ | |__  | |  ___ 
 | |  | ||  __  || |  | | / _ \ / __|| | / _` || '__|/ _` || '_ \ | | / _ \
 | |__| || |  | || |__| ||  __/| (__ | || (_| || |  | (_| || |_) || ||  __/
 |_____/ |_|  |_||_____/  \___| \___||_| \__,_||_|   \__,_||_.__/ |_| \___|
 

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"

Description

  • Swift Tools 5.0.0
View More Packages from this Author

Dependencies

Last updated: Fri Oct 18 2024 12:05:51 GMT-0900 (Hawaii-Aleutian Daylight Time)