All Projects → muukii → Stackscrollview

muukii / Stackscrollview

Licence: mit
📋 iOS Form UI Builder in Swift (powered by UICollectionView)

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Stackscrollview

Flix
iOS reusable form library in Swift.
Stars: ✭ 725 (+89.79%)
Mutual labels:  form, uicollectionview
React Native Formik
Set of helpers to make form awesome with React Native and Formik
Stars: ✭ 376 (-1.57%)
Mutual labels:  form
Zcycleview
This is a picture/text infinite-scroll library with UICollectionView, It can be very easy to help you make the banner you want 使用UICollectionView实现常见图片/文字无限轮播,支持自定义cell,自定义pageControl,以及轮播样式
Stars: ✭ 319 (-16.49%)
Mutual labels:  uicollectionview
Functionaltabledata
Declarative UITableViewDataSource implementation
Stars: ✭ 347 (-9.16%)
Mutual labels:  uicollectionview
Vue Form Builder
Build powerful vue form with JSON schema and composition api.
Stars: ✭ 325 (-14.92%)
Mutual labels:  form
Bootstrap 4 Login Page
Bootstrap 4 Login Page Template
Stars: ✭ 352 (-7.85%)
Mutual labels:  form
Vxe Table
🐬 vxe-table vue 表格解决方案
Stars: ✭ 4,242 (+1010.47%)
Mutual labels:  form
Multiitem
一个优雅的实现多类型的RecyclerView类库 支持DataBinding Form表单录入 跨多个RecyclerView拖动
Stars: ✭ 381 (-0.26%)
Mutual labels:  form
Conversational Form
Turning web forms into conversations
Stars: ✭ 3,649 (+855.24%)
Mutual labels:  form
Ehhorizontalselectionview
Horizontal table view style controller
Stars: ✭ 346 (-9.42%)
Mutual labels:  uicollectionview
Formik Persist
💾 Persist and rehydrate a Formik form to localStorage
Stars: ✭ 345 (-9.69%)
Mutual labels:  form
Approvejs
A simple JavaScript validation library that doesn't interfere
Stars: ✭ 336 (-12.04%)
Mutual labels:  form
Formstate
❤️ Form state so simple that you will fall in love 🌹
Stars: ✭ 357 (-6.54%)
Mutual labels:  form
Tall Forms
Laravel Livewire (TALL-stack) form generator with realtime validation, file uploads, array fields, blade form input components and more.
Stars: ✭ 321 (-15.97%)
Mutual labels:  form
Epoxy Ios
Epoxy is a suite of declarative UI APIs for building UIKit applications in Swift
Stars: ✭ 377 (-1.31%)
Mutual labels:  uicollectionview
Vue Json Schema Form
基于Vue/Vue3,Json Schema 和 ElementUi/antd/iview3 等生成 HTML Form 表单,用于活动编辑器、h5编辑器、cms等数据配置;支持可视化生成表单Schema 。 Generate a form using Vue/Vue3, Json Schema and ElementUi/antdv/iview3
Stars: ✭ 300 (-21.47%)
Mutual labels:  form
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift
Stars: ✭ 3,395 (+788.74%)
Mutual labels:  uicollectionview
Formily
Alibaba Group Unified Form Solution -- Support React/ReactNative/Vue2/Vue3
Stars: ✭ 6,554 (+1615.71%)
Mutual labels:  form
Native
Generate a form using JSON Schema and Vue.js
Stars: ✭ 382 (+0%)
Mutual labels:  form
React Hook Form
📋 React Hooks for form state management and validation (Web + React Native)
Stars: ✭ 24,831 (+6400.26%)
Mutual labels:  form

StackScrollView

CI Status Version License Platform Carthage compatible

⚠️ This sample is using demo-components. StackScrollView does not have default-components. StackScrollView is like UIStackView. So, we need to create the components we need.

What is this?

StackScrollView builds form UI easily.

StackScrollView includes UICollectionView. UICollectionView calculates size of view by AutoLayout, then that display. (Use systemLayoutSizeFitting)

  • We call StackCell instead of Cell on StackScrollView.
  • We no longer need to consider reusing Cells.
  • StackCell requires constraint based layout.

Usage

Basic usage

let stack = StackScrollView()

stack.append(view: ...)

stack.remove(view: ..., animated: true)

APIs

StackScrollView

func append(view: UIView)
func remove(view: UIView, animated: Bool)
func scroll(to view: UIView, at position: UICollectionViewScrollPosition, animated: Bool)

StackCellType

StackScrollView does not required StackCellType. if StackCell has StackCellType, be easy that control StackCell.

func scrollToSelf(animated: Bool)
func scrollToSelf(at position: UICollectionViewScrollPosition, animated: Bool)
func updateLayout(animated: Bool)
func remove()

Demo has included this APIs usage.

Create CustomCell from Code

We have to set constraints completely.

final class LabelStackCell: UIView {
  
  private let label = UILabel()
  
  init(title: String) {
    super.init(frame: .zero)
    
    addSubview(label)
    label.translatesAutoresizingMaskIntoConstraints = false
    
    label.topAnchor.constraint(greaterThanOrEqualTo: topAnchor, constant: 8).isActive = true
    label.bottomAnchor.constraint(lessThanOrEqualTo: bottomAnchor, constant: 8).isActive = true
    label.rightAnchor.constraint(equalTo: rightAnchor, constant: 8).isActive = true
    label.leftAnchor.constraint(equalTo: leftAnchor, constant: 8).isActive = true
    label.centerYAnchor.constraint(equalTo: centerYAnchor).isActive = true
    heightAnchor.constraint(greaterThanOrEqualToConstant: 40).isActive = true
    
    label.font = UIFont.preferredFont(forTextStyle: .body)
    label.text = title
  }
}
let stack = StackScrollView()
stack.append(view: LabelStackCell(title: "Label"))

Create CustomCell from XIB

We can use UIView from XIB.

This framework has NibLoader<T: UIView>. It might be useful for you.

Create everything

You can create any Cell. Please, check StackScrollView-Demo

ManualLayout

You can create Cell with ManualLayout.

If you use ManualLayout, the Cell have to use ManualLayoutStackCellType. Then, return self-size based on maximum size in size(maxWidth:maxHeight)

Author

muukii, [email protected]

License

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