Create SwiftUI Views with any data

Overview

ObjectUI

Create SwiftUI Views with any data

Usage

import ObjectUI

Basic Example

struct ContentView: View {
    var body: some View {
        ObjectView { object in
            VStack {
                if let value = object.value(as: String.self) {
                    Text(value)
                        .font(.largeTitle)
                } else {
                    Text("Waiting...")
                }
                
                Button("Wave") {
                    DispatchQueue.main.async {
                        object.set(value: "๐Ÿ‘‹")
                    }
                }
            }
        }
    }
}

JSON Example

struct ContentView: View {
    let json = """
        {
          "userId": 1,
          "id": 2,
          "title": "quis ut nam facilis et officia qui",
          "completed": false
        }
        """
        .data(using: .utf8)
    
    var body: some View {
        ObjectView(data: json) { object in
            VStack {
                object.userId.value(as: Int.self).map { userId in
                    Text("\(userId)")
                }
                
                object.id.value(as: Int.self).map { id in
                    Text("\(id)")
                }
                
                object.title.value(as: String.self).map { title in
                    Text(title)
                }
                
                object.completed.value(as: Bool.self).map { completed in
                    Text(completed.description)
                }
            }
        }
    }
}
You might also like...
Elissa displays a notification on top of a UITabBarItem or any UIView anchor view to reveal additional information.
Elissa displays a notification on top of a UITabBarItem or any UIView anchor view to reveal additional information.

Elissa Attach a local notification to any UIView to reveal additional user guidance. Usage Example Per default, Elissa will try to align to the center

An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.

LoadingShimmer An easy way to add a shimmering effect to any view with just single line of code. It is useful as an unobtrusive loading indicator. Thi

Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.
Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.

Twinkle โœจ Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle. This library creates several CAEmitterLayers and animate

๐Ÿ“น Framework to Play a Video in the Background of any UIView
๐Ÿ“น Framework to Play a Video in the Background of any UIView

SwiftVideoBackground is an easy to use Swift framework that provides the ability to play a video on any UIView. This provides a beautiful UI for login

Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

Create macOS apps with Swift packages instead of Xcode projects

Swift Bundler A Swift Package Manager wrapper that allows the creation of MacOS apps with Swift packages instead of Xcode projects. My motivation is t

Create descriptive UIKit screens, faster!
Create descriptive UIKit screens, faster!

Columbina's DeclarativeUIKit Create descriptive UIKit screens, faster! Get rid of constraints manipulation and use declarative language to create your

Confetti View lets you create a magnificent confetti view in your app
Confetti View lets you create a magnificent confetti view in your app

ConfettiView Confetti View lets you create a magnificent confetti view in your app. This was inspired by House Party app's login screen. Written in Sw

A UIControl subclass that makes it easy to create empty states.
A UIControl subclass that makes it easy to create empty states.

AZEmptyState Making empty state simple. Screenshots Installation Cocoa Pods: pod 'AZEmptyState' Manual: Simply drag and drop the Sources folder to you

Releases(1.3.0)
  • 1.3.0(Aug 7, 2021)

    1.3.0

    1.2.0

    1.1.0

    1.0.1

    1.0.0

    Create SwiftUI Views with any data

    Usage

    import ObjectUI
    

    Basic Example

    struct ContentView: View {
        var body: some View {
            ObjectView { object in
                VStack {
                    if let value = object.value(as: String.self) {
                        Text(value)
                            .font(.largeTitle)
                    } else {
                        Text("Waiting...")
                    }
                    
                    Button("Wave") {
                        DispatchQueue.main.async {
                            object.set(value: "๐Ÿ‘‹")
                        }
                    }
                }
            }
        }
    }
    

    JSON Example

    struct ContentView: View {
        let json = """
            {
              "userId": 1,
              "id": 2,
              "title": "quis ut nam facilis et officia qui",
              "completed": false
            }
            """
            .data(using: .utf8)
        
        var body: some View {
            ObjectView(data: json) { object in
                VStack {
                    object.userId.value(as: Int.self).map { userId in
                        Text("\(userId)")
                    }
                    
                    object.id.value(as: Int.self).map { id in
                        Text("\(id)")
                    }
                    
                    object.title.value(as: String.self).map { title in
                        Text(title)
                    }
                    
                    object.completed.value(as: Bool.self).map { completed in
                        Text(completed.description)
                    }
                }
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Jul 26, 2021)

    1.2.0

    1.1.0

    1.0.1

    1.0.0

    Create SwiftUI Views with any data

    Usage

    import ObjectUI
    

    Basic Example

    struct ContentView: View {
        var body: some View {
            ObjectView { object in
                VStack {
                    if let value = object.value(as: String.self) {
                        Text(value)
                            .font(.largeTitle)
                    } else {
                        Text("Waiting...")
                    }
                    
                    Button("Wave") {
                        DispatchQueue.main.async {
                            object.set(value: "๐Ÿ‘‹")
                        }
                    }
                }
            }
        }
    }
    

    JSON Example

    struct ContentView: View {
        let json = """
            {
              "userId": 1,
              "id": 2,
              "title": "quis ut nam facilis et officia qui",
              "completed": false
            }
            """
            .data(using: .utf8)
        
        var body: some View {
            ObjectView(data: json) { object in
                VStack {
                    object.userId.value(as: Int.self).map { userId in
                        Text("\(userId)")
                    }
                    
                    object.id.value(as: Int.self).map { id in
                        Text("\(id)")
                    }
                    
                    object.title.value(as: String.self).map { title in
                        Text(title)
                    }
                    
                    object.completed.value(as: Bool.self).map { completed in
                        Text(completed.description)
                    }
                }
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 1.1.0(Jun 25, 2021)

    1.1.0

    1.0.1

    1.0.0

    Create SwiftUI Views with any data

    Usage

    import ObjectUI
    

    Basic Example

    struct ContentView: View {
        var body: some View {
            ObjectView { object in
                VStack {
                    if let value = object.value(as: String.self) {
                        Text(value)
                            .font(.largeTitle)
                    } else {
                        Text("Waiting...")
                    }
                    
                    Button("Wave") {
                        DispatchQueue.main.async {
                            object.set(value: "๐Ÿ‘‹")
                        }
                    }
                }
            }
        }
    }
    

    JSON Example

    struct ContentView: View {
        let json = """
            {
              "userId": 1,
              "id": 2,
              "title": "quis ut nam facilis et officia qui",
              "completed": false
            }
            """
            .data(using: .utf8)
        
        var body: some View {
            ObjectView(data: json) { object in
                VStack {
                    object.userId.value(as: Int.self).map { userId in
                        Text("\(userId)")
                    }
                    
                    object.id.value(as: Int.self).map { id in
                        Text("\(id)")
                    }
                    
                    object.title.value(as: String.self).map { title in
                        Text(title)
                    }
                    
                    object.completed.value(as: Bool.self).map { completed in
                        Text(completed.description)
                    }
                }
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 1.0.1(Jun 25, 2021)

    1.0.1

    1.0.0

    Create SwiftUI Views with any data

    Usage

    import ObjectUI
    

    Basic Example

    struct ContentView: View {
        var body: some View {
            ObjectView { object in
                VStack {
                    if let value = object.value(as: String.self) {
                        Text(value)
                            .font(.largeTitle)
                    } else {
                        Text("Waiting...")
                    }
                    
                    Button("Wave") {
                        DispatchQueue.main.async {
                            object.set(value: "๐Ÿ‘‹")
                        }
                    }
                }
            }
        }
    }
    

    JSON Example

    struct ContentView: View {
        let json = """
            {
              "userId": 1,
              "id": 2,
              "title": "quis ut nam facilis et officia qui",
              "completed": false
            }
            """
            .data(using: .utf8)
        
        var body: some View {
            ObjectView(data: json) { object in
                VStack {
                    object.userId.value(as: Int.self).map { userId in
                        Text("\(userId)")
                    }
                    
                    object.id.value(as: Int.self).map { id in
                        Text("\(id)")
                    }
                    
                    object.title.value(as: String.self).map { title in
                        Text(title)
                    }
                    
                    object.completed.value(as: Bool.self).map { completed in
                        Text(completed.description)
                    }
                }
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Jun 23, 2021)

    Create SwiftUI Views with any data

    Usage

    import ObjectUI
    

    Basic Example

    struct ContentView: View {
        var body: some View {
            ObjectView { object in
                VStack {
                    if let value = object.value(as: String.self) {
                        Text(value)
                            .font(.largeTitle)
                    } else {
                        Text("Waiting...")
                    }
                    
                    Button("Wave") {
                        DispatchQueue.main.async {
                            object.set(value: "๐Ÿ‘‹")
                        }
                    }
                }
            }
        }
    }
    

    JSON Example

    struct ContentView: View {
        let json = """
            {
              "userId": 1,
              "id": 2,
              "title": "quis ut nam facilis et officia qui",
              "completed": false
            }
            """
            .data(using: .utf8)
        
        var body: some View {
            ObjectView(data: json) { object in
                VStack {
                    object.userId.value(as: Int.self).map { userId in
                        Text("\(userId)")
                    }
                    
                    object.id.value(as: Int.self).map { id in
                        Text("\(id)")
                    }
                    
                    object.title.value(as: String.self).map { title in
                        Text(title)
                    }
                    
                    object.completed.value(as: Bool.self).map { completed in
                        Text(completed.description)
                    }
                }
            }
        }
    }
    
    Source code(tar.gz)
    Source code(zip)
Owner
Zach Eriksen
iOS Developer for From Now On LLC; Proud member of oneleif; I ๐Ÿงก Swift; Husband; Supporter for all
Zach Eriksen
Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views

StatusProvider Protocol to handle initial Loadings, Empty Views and Error Handling in a ViewController & views CocoaPods Podfile pod 'StatusProvider'

Mario Hahn 887 Dec 22, 2022
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.

BadgeHub A way to quickly add a notification badge icon to any view. Demo/Example For demo: $ pod try BadgeHub To run the example project, clone the r

Jogendra 772 Dec 28, 2022
Zeplin component preview for your SwiftUI views

A Zeplin component preview for your SwiftUI views. You can use Zeplin components instead of real views within your app until you implement them.

Danis Tazetdinov 4 Sep 1, 2022
A SwiftUI Views for wrapping HStack elements into multiple lines

SwiftUI WrappingStack A SwiftUI Views for wrapping HStack elements into multiple lines. List of supported views WrappingHStack - provides HStack that

Denis 50 Jan 6, 2023
Runtime introspection and unit testing of SwiftUI views

ViewInspector is a library for unit testing SwiftUI views. It allows for traversing a view hierarchy at runtime providing direct access to the underlying View structs.

Alexey Naumov 1.5k Jan 2, 2023
List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model and doesn't depend on UI framework

SwiftListTreeDataSource List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model, so can

Dzmitry Antonenka 26 Nov 26, 2022
Placeholder views based on content, loading, error or empty states

StatefulViewController A protocol to enable UIViewControllers or UIViews to present placeholder views based on content, loading, error or empty states

Alexander Schuch 2.1k Dec 8, 2022
Compose views using enums swiftly: `let label: UILabel = [.text("Hello"), .textColor(.red)]`

ViewComposer Style views using an enum array with its attributes: let label: UILabel = [.text("Hello World"), .textColor(.red)] Table of Contents Inst

Alexander Cyon 28 Jul 5, 2022
AGCircularPicker is helpful component for creating a controller aimed to manage any calculated parameter

We are pleased to offer you our new free lightweight plugin named AGCircularPicker. AGCircularPicker is helpful for creating a controller aimed to man

Agilie Team 617 Dec 19, 2022
A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView and iPhone X safe area support for content reloading. Built for iOS 10 and later.

Arale A custom stretchable header view for UIScrollView or any its subclasses with UIActivityIndicatorView support for reloading your content. Built f

Putra Z. 43 Feb 4, 2022