All Projects → lkzhao → UIComponent

lkzhao / UIComponent

Licence: MIT license
Write UI in crazy speed, with great perf & no limitations.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to UIComponent

Owl
A declarative type-safe framework for building fast and flexible lists with UITableViews & UICollectionViews
Stars: ✭ 423 (+27.03%)
Mutual labels:  uicollectionview, uikit
Collectionviewpaginglayout
a simple but highly customizable paging layout for UICollectionView.
Stars: ✭ 947 (+184.38%)
Mutual labels:  uicollectionview, uikit
Alignedcollectionviewflowlayout
A collection view layout that gives you control over the horizontal and vertical alignment of the cells.
Stars: ✭ 751 (+125.53%)
Mutual labels:  uicollectionview, uikit
Wlemptystate
WLEmptyState is an iOS based component that lets you customize the view when the dataset of a UITableView or a UICollectionView is empty. We created a sample project with the WLEmptyState component to show how you can use it.
Stars: ✭ 305 (-8.41%)
Mutual labels:  uicollectionview, uikit
Collectionviewslantedlayout
A CollectionView Layout displaying a slanted cells
Stars: ✭ 2,029 (+509.31%)
Mutual labels:  uicollectionview, uikit
Epoxy Ios
Epoxy is a suite of declarative UI APIs for building UIKit applications in Swift
Stars: ✭ 377 (+13.21%)
Mutual labels:  uicollectionview, uikit
Verticalcardswiper
A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.
Stars: ✭ 830 (+149.25%)
Mutual labels:  uicollectionview, uikit
Reactivelists
React-like API for UITableView & UICollectionView
Stars: ✭ 250 (-24.92%)
Mutual labels:  uikit, declarative-ui
Gskstretchyheaderview
A generic stretchy header for UITableView and UICollectionView
Stars: ✭ 1,624 (+387.69%)
Mutual labels:  uicollectionview, uikit
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: ✭ 92 (-72.37%)
Mutual labels:  uicollectionview, uikit
TinderUISamples
[ING] - TinderのようなUIを様々な実装で実現してみる
Stars: ✭ 30 (-90.99%)
Mutual labels:  uicollectionview, uikit
Uicollectionviewsplitlayout
UICollectionViewSplitLayout makes collection view more responsive.
Stars: ✭ 226 (-32.13%)
Mutual labels:  uicollectionview, uikit
SectionKit
♻️ Reusable sections for UICollectionView
Stars: ✭ 47 (-85.89%)
Mutual labels:  uicollectionview, uikit
Uicollectionview Layouts Kit
📐 A set of custom layouts for UICollectionView with examples [Swift 5.3, iOS 12].
Stars: ✭ 410 (+23.12%)
Mutual labels:  uicollectionview, uikit
ios ui recipe showcase
iOSアプリ開発 - UI実装であると嬉しいレシピブック掲載サンプル
Stars: ✭ 54 (-83.78%)
Mutual labels:  uicollectionview, uikit
Viewanimator
ViewAnimator brings your UI to life with just one line
Stars: ✭ 6,592 (+1879.58%)
Mutual labels:  uicollectionview, uikit
Katana Ui Swift
UIKit port of React, built on top of Katana.
Stars: ✭ 53 (-84.08%)
Mutual labels:  uikit, declarative-ui
Komponents Deprecated
📦 React-inspired UIKit Components - ⚠️ Deprecated
Stars: ✭ 202 (-39.34%)
Mutual labels:  uikit, declarative-ui
Pagingkit
PagingKit provides customizable menu UI. It has more flexible layout and design than the other libraries.
Stars: ✭ 1,030 (+209.31%)
Mutual labels:  uicollectionview, uikit
Collor
A declarative-ui framework for UICollectionView with great and useful features.
Stars: ✭ 182 (-45.35%)
Mutual labels:  uicollectionview, declarative-ui

UIComponent

Write UI in crazy speed, with great perf & no limitations.

SwiftUI still haven't satisfied my requirements. So I build this.

This framework allows you to build UI using UIKit with syntax similar to SwiftUI. You can think about this as an improved UICollectionView.

Highlights:

  • Great performance through global cell reuse.
  • Built in layouts including Stack, Flow, & Waterfall.
  • Declaritive API based on resultBuilder and modifier syntax.
  • Work seemless with existing UIKit views, viewControllers, and transitions.
  • dynamicMemberLookup support for all ViewComponents which can help you easily update your UIKit views.
  • Animator API to apply animations when cells are being moved, updated, inserted, or deleted.
  • Simple architecture for anyone to be able to understand.
  • Easy to create your own Components.
  • No state management or two-way binding.

Production Apps that use UIComponent

  • Noto

    Noto uses UIComponent for all of the UI including the text editor. The text editor view is a ComponentScrollView with each line rendered as a cell through a custom component. This app showcases the level of flexibility that this framework has compares to SwiftUI. I personally use some SwiftUI in my app, but most of the time, I fallback to UIKit to drill down the exact look and feel that I want while also provide great performance.

    Definitely let me know if you know how to create a custom text view using SwiftUI, if that ever becomes a reality, I would probably switch completely.

  • Ink

How to use

At its core, it provides two UIView subclass: ComponentView and ComponentScrollView.

These two classes takes in a component parameter where you use to construct your UI using declarative syntax. You can also apply modifiers to these components to treak them further.

For example:

componentView.component =  VStack(spacing: 8) {
  for (index, cardData) in cards.enumerated() {
    Card(card: cardData) { [unowned self] in
      self.cards.remove(at: index)
    }
  }
  AddCardButton { [unowned self] in
    self.cards.append(CardData(title: "Item \(self.newCardIndex)",
                               subtitle: "Description \(self.newCardIndex)"))
    self.newCardIndex += 1
  }
}.inset(20)

Checkout the example project for more in-depth examples.

Built in components

Layouts

  • VStack
  • HStack
  • Waterfall
  • Flow

View

  • Text
  • Image
  • Separator

Utility

  • ForEach
  • Space
  • Join

Useful modifiers

  • .inset()
  • .size()
  • .background()
  • .overlay()
  • .flex()
  • .view()
  • .tappableView()
  • .scrollView()

WIP

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].