SkillAgentSearch skills...

FlexStack

A flex layout (like CSS flex) in SwiftUI with the new `Layout` protocol. Easy usages as `HStack` or `VStack`.

Install / Use

/learn @CatREFuse/FlexStack
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

FlexStack

A flex layout (like CSS flex) in SwiftUI with the new Layout protocol. Easy as HStack or VStack.

Basic Usage


FlexStack {
  // ...Subviews
}

FlexStack(horzontalSpacing: 12, verticalSpacing: 16) {
  // ...Subviews
}

Discussion

Perfectly compatible with Layout animation

FlexStackDemo.gif

Compatibility

Same as Layout protocol limit.

Tested on iOS 16.0, *.

Todos

  • [ ] Optimize for more layout options. Now FlexStack works best for subviews with the same ideal height.

Installation

Using SPM: Select File > Swift Packages > Add Package Dependency, then enter the URL of this page.

Related Skills

View on GitHub
GitHub Stars15
CategoryDevelopment
Updated1y ago
Forks0

Languages

Swift

Security Score

80/100

Audited on Dec 9, 2024

No findings