All Projects → mecid → Uikitswiftdsl

mecid / Uikitswiftdsl

Licence: mit
Swift DSL for UIKit

Programming Languages

swift
15916 projects
dsl
153 projects

Labels

Projects that are alternatives of or similar to Uikitswiftdsl

Vue Notus
Vue Notus: Free Tailwind CSS UI Kit and Admin
Stars: ✭ 108 (-19.4%)
Mutual labels:  uikit
Ios.blog.swiftui search bar in navigation bar
🔍 SwiftUI search bar in the navigation bar.
Stars: ✭ 124 (-7.46%)
Mutual labels:  uikit
5guis
A tiny macOS app that can detect the GUI technologies used in other apps.
Stars: ✭ 130 (-2.99%)
Mutual labels:  uikit
Distancepicker
Custom UIKit control to select a distance with a pan gesture, written in Swift
Stars: ✭ 118 (-11.94%)
Mutual labels:  uikit
Ct Material Kit Pro
Premium Bootstrap 4 UI Kit based on Google's Material Design
Stars: ✭ 123 (-8.21%)
Mutual labels:  uikit
Components
MobileUI was created thinking of making your hybrid application faster and smaller since you only install what you are really going to use for UI.
Stars: ✭ 125 (-6.72%)
Mutual labels:  uikit
Vuikit
A responsive Vue UI library for web site interfaces
Stars: ✭ 1,479 (+1003.73%)
Mutual labels:  uikit
Paper Kit 2 Angular
Free Bootstrap 4 UI Kit for Angular 2+
Stars: ✭ 133 (-0.75%)
Mutual labels:  uikit
Awesome Tca
Awesome list for The Composable Architecture
Stars: ✭ 124 (-7.46%)
Mutual labels:  uikit
Multiplatform Compose
A Kotlin library to use Jetpack Compose in Android and iOS. Allow to write UI for both in Kotin. Still experimental as many compose features are not yet available.
Stars: ✭ 126 (-5.97%)
Mutual labels:  uikit
Movieflex ios
iOS application for Movie / Actor information with clean / intuitive UI and MVVM architecture.
Stars: ✭ 119 (-11.19%)
Mutual labels:  uikit
Gskstretchyheaderview
A generic stretchy header for UITableView and UICollectionView
Stars: ✭ 1,624 (+1111.94%)
Mutual labels:  uikit
Kgnautolayout
Making AutoLayout Easy
Stars: ✭ 127 (-5.22%)
Mutual labels:  uikit
React Virgin
The react-native UI Kit you've been looking for.
Stars: ✭ 1,523 (+1036.57%)
Mutual labels:  uikit
Combine Mvvm
Sample project with Combine & UIKit framework, MVVM architecture
Stars: ✭ 132 (-1.49%)
Mutual labels:  uikit
Weui Sketch
weui sketch by ZTfer
Stars: ✭ 116 (-13.43%)
Mutual labels:  uikit
Uiimageheic
UIImage category that adds familiar HEIC encoding.
Stars: ✭ 125 (-6.72%)
Mutual labels:  uikit
Overlap
Tiny iOS library to achieve overlap visual effect
Stars: ✭ 133 (-0.75%)
Mutual labels:  uikit
Flamesui
A css-based web components.
Stars: ✭ 133 (-0.75%)
Mutual labels:  uikit
Pbtreeview
An UITreeView implementation from UITableView that Apple missed in its UIKit framework. And it is in pure Swift.
Stars: ✭ 128 (-4.48%)
Mutual labels:  uikit

UIKitSwiftDSL

Version Carthage compatible License Platform

Swift DSL for UIKit. Simple DSL in Swift which gives you opportunity to write layout code in readable and declarative way.

Usage

let rootView = stack {
    $0.spacing = 16
    $0.axis = .vertical
    $0.isLayoutMarginsRelativeArrangement = true

    $0.stack {
        $0.distribution = .fillEqually
        $0.axis = .horizontal

        $0.label {
            $0.textAlignment = .center
            $0.textColor = .white
            $0.text = "Hello"
        }

        $0.label {
            $0.textAlignment = .center
            $0.textColor = .white
            $0.text = "World"
        }

        $0.customLabel {
            $0.textAlignment = .center
            $0.textColor = .white
            $0.text = "!!!"
        }
    }

    let messageButton = $0.button {
        $0.tintColor = .white
        $0.setTitle("Say Hi!", for: .normal)
    }

    $0.view {
        $0.backgroundColor = .clear
    }
}

Custom View

If you are using some Custom Views in your project you can easily add it to support DSL.

import UIKitSwiftDSL

class CustomLabel: UILabel {
// Custom implementation here
}

extension UIView {
    @discardableResult
    func customLabel(apply closure: (CustomLabel) -> Void) -> CustomLabel {
        return custom(CustomLabel(), apply: closure)
    }
}

AutoLayout

UIKitSwiftDSL doesn't have any logic related to AutoLayout. You can use any library you want.

$0.button {
    $0.tintColor = .white
    $0.setTitle("Say Hi!", for: .normal)
    
    // Add your AutoLayout code here.
}

Example

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

Installation

UIKitSwiftDSL is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'UIKitSwiftDSL'

UIKitSwiftDSL is available through Carthage. To install it, simply add the following line to your Cartfile:

github "mecid/UIKitSwiftDSL"

Author

Majid Jabrayilov, [email protected]

License

UIKitSwiftDSL is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].