Coder Social home page Coder Social logo

lkzhao / uicomponent Goto Github PK

View Code? Open in Web Editor NEW
382.0 16.0 27.0 8.03 MB

A modern, declarative approach to building user interfaces with UIKit.

License: MIT License

Swift 100.00%
ui uicollectionview uikit declarative-ui swiftui unidirectional-data-flow

uicomponent's Introduction

UIComponent

UIComponent is a declarative and modern framework to build user interfaces with UIKit. With the power of @resultBuilder and @dynamicMemberLookup, your UIKit interface can be easily constructed with a syntax similar to SwiftUI. UIComponent also embraces unidirectional data flow instead of two way binding, and offers great performance and optimization opportunities.

Documentation

Getting Started

Advanced Topics

Checkout the Examples folder for code examples.

uicomponent's People

Contributors

gopatrik avatar honghaoz avatar lkzhao avatar marceloqueiroz avatar mx-iris avatar stleamist avatar wwdc14yh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

uicomponent's Issues

State Binding

If the concept of state binding is added to the data, I think this can be better
This is a great binding design, I think it will help you

reference: State

HStack has bug

Hi,

I use HStack Layout Component has a long string, I hope it will wrap, but it goes beyond the screen.

Is it possible to add CSS Flex Wrap properties to the Stack component?

e.g

HStack(wrap: .wrap || .noWrap) {
    ......
}

this my codes

HStack code

HStack {
    Text("long long long long long long long long long long long long long long long long long long long long long long long long long long long long text")
}.size(width: .percentage(1)).inset(h: 10, v: 10)

VStack code

VStack {
    Text("long long long long long long long long long long long long long long long long long long long long long long long long long long long long text")
}.size(width: .percentage(1)).inset(h: 10, v: 10)

Also exceed the screen boundary

VStack {
    HStack {
        VStack {
            Text("long long long long long long long long long long long long long long long long long long long long long long long long long long long long text")
        }
    }
}.size(width: .percentage(1)).inset(h: 10, v: 10)

HStack unusual
iShot2021-07-16 23 33 49

VStack normal
iShot2021-07-16 23 33 49

ViewComponent enhancement

Hi,
I want rounded corners, but I don’t know the specific height of this Text component. Is there any way to set it?

It is possible to increase a similar SwiftUI.clipShape(Capsule())modified it? Because rounded corners are often used

this my code
Text("Round Style").textColor(.white).inset(h: 20, v: 10).background(SimpleViewComponent<UIView>().backgroundColor(.black))

actual
iShot2021-07-12 01 52 19

expect
iShot2021-07-12 01 55 22

SimpleViewComponent Size Issue

Hi, it's me again😅
I used the SimpleViewComponent component in the example, I cannot get the correct size

What can I do to make the component width and height correct?

this my code

SimpleViewComponent<UIButton>().update {
    $0.setTitle("button", for: .normal)
    $0.setTitleColor(.systemBlue, for: .normal)
}.backgroundColor(.brown)

Size:zero

Thanks for your help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.