The declarative approach to UIKit.

Overview

Swift SPM compatible MIT

SugarKit

SugarKit is a declarative approach to the UIKit framework. It allows you to

Declare your views in a clean and concise way like

let button = UIButton(frame: .zero)
    .setBackgroundColor(.red)
    .setTitleColor(.white, forState: .normal)
    .setTitle("Tap me", forState: .normal)
    .setFont(.systemFont(ofSize: 14))
    .setWidth(200)
    .setHeight(40)
    .setLayerCornerRadius(14)
    
let label = UILabel(frame: .zero)
    .setText("Read me :)")
    .setFont(.systemFont(ofSize: 19))
    .setTextAlignment(.center)
    .setTextColor(.gray)

Use convenient interface for working with stacks

let stack = VerticalStack {
            
    UILabel(frame: .zero)
        .setText("Tap any button")
        .setFont(.systemFont(ofSize: 12))
        
    HorizontalStack {
    
        button1
        
        button2
        
        button3
    
    }
    .setSpacing(20)
    .setAlignemnt(.center)
    .setDistribution(.fillEqually)
            
}
.setSpacing(40)
.setAlignemnt(.center)
You might also like...
Apple provides us two ways to use UIKit views in SwiftUI

RepresentableKit Apple provides us two ways to use UIKit views in SwiftUI: UIVie

Alura Viagens with UIKit
Alura Viagens with UIKit

Alura Viagens UIKit UITableView Protocolo UITableViewDelegate Constraints para d

A simple checklist app using UIKit
A simple checklist app using UIKit

UIKit Checklist App Data Persistence Icon Selector Notification Scheduling Multi

PillboxView - A Pillbox informational view for iOS written in UIKit
PillboxView - A Pillbox informational view for iOS written in UIKit

Pillbox View Pillbox View shows a small bubble, pill looking box that sides from

LemonadeDeclarativeUI framework contains some new functions for UIKit

LemonadeDeclarativeUI framework contains some new functions for UIKit. This library has been developing. If you want to contribute reach me!

Using the UIKitChain framework, You can create a UIKit component in one line of code.
Using the UIKitChain framework, You can create a UIKit component in one line of code.

Using the UIKitChain framework, You can create a UIKit component in one line of code. Installation CocoaPods CocoaPods is a dependency manager for Coc

UIKitTest - Xcode, UIKit and Swift playground

UIKit Test Just a Xcode, UIKit and Swift playground (try and learning purposes).

Swift-picker-views - inline single and multi picker views for UIKit. Without tableview! Easy and simple
Swift-picker-views - inline single and multi picker views for UIKit. Without tableview! Easy and simple

swift-picker-views Inline single and multiple picker views for UIKit. No tablevi

The missing UIKit component.  A scrollable alternative to UISegmentedControl
The missing UIKit component. A scrollable alternative to UISegmentedControl

Requirements iOS 15.0 and higher Installation Swift Package Manager: dependencies: [ .package(url: "https://github.com/hugo-pivaral/UITabControl.git

Owner
Roman Nabiullin
Middle iOS developer, Bachelor student.
Roman Nabiullin
🌵Declarative UIKit

Viewtiful Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation Viewtifu

Yongjun Lee 2 Oct 28, 2021
Controls-Practice-UIKit- - Controls Practice (UIKit)

Controls Practice (UIKit) Change a number 0 to 255 different ways: Button (+1) I

null 1 Feb 13, 2022
A declarative Auto Layout DSL for Swift :iphone::triangular_ruler:

Cartography ?? ?? Using Cartography, you can set up your Auto Layout constraints in declarative code and without any stringly typing! In short, it all

Robb Böhnke 7.3k Jan 4, 2023
⚓️ Declarative, extensible, powerful Auto Layout

EasyAnchor ❤️ Support my apps ❤️ Push Hero - pure Swift native macOS application to test push notifications PastePal - Pasteboard, note and shortcut m

Khoa 449 Nov 10, 2022
Declarative iOS UI sugar framework built on FlexLayout

Declarative iOS UI sugar framework built on FlexLayout

당근마켓 97 Dec 9, 2022
Lightweight declarative auto-layout framework for Swift

SwiftyLayout SwiftyLayout is a framework that allows to describe layout constraints (ie NSLayoutConstraint) as a simple mathematical formula in a Swif

Hisakuni Fujimoto 15 Nov 7, 2017
A declarative UI framework for iOS

Layout Layout is a native Swift framework for implementing iOS user interfaces using XML template files and runtime-evaluated expressions. It is inten

Nick Lockwood 2.2k Dec 23, 2022
Declarative Auto Layout in Swift, clean and simple

Tails Tails is a take on declarative Auto Layout. If you don't like typing (like me), it might be your kind of thing! Tails is written in Swift and cu

Nick Tymchenko 17 Jan 31, 2019
CompositionalLayoutDSL, library to simplify the creation of UICollectionViewCompositionalLayout. It wraps the UIKit API and makes the code shorter and easier to read.

CompositionalLayoutDSL CompositionalLayoutDSL is a Swift library. It makes easier to create compositional layout for collection view. Requirements Doc

FABERNOVEL 44 Dec 27, 2022
Pocket Trainer UIKit

Pocket-Trainer-UIKit Помощник для занятий в тренажерном зале API для взаимодействия с базой данных упражнений и первоначальное приложение на Android з

vladukha 0 Nov 28, 2021