Skip to content

0.4.0

Compare
Choose a tag to compare
@benlmyers benlmyers released this 17 Mar 05:42
· 53 commits to main since this release

Thanks for using ShinySwiftUI! 🎉

New Features

Generic Stack

Quickly change from an HStack to a VStack, and vice-versa:

// Leading-aligned VStack or Top-aligned HStack
GStack(platform == .iOS ? .horizontal : .vertical, alignment: .beginning, spacing: .s) {
  Text("Item 1")
  Text("Item 2")
  Text("Item 3")
}

// Trailing-aligned VStack or bottom-aligned HStack
GStack(platform == .iOS ? .horizontal : .vertical, alignment: .end) { /* ... */ }

Text Transitions

You can now easily use transitions on Text values with the transition(_:value:) view modifier:

@State var value = "Hello World!"

Text(value)
  .transition(.turn, value: value)

Highlight

Highlight views by changing a global Int value:

// Highlights the view if global.viewToHighlight equals 23
MyView().highlight(23, monitoring: $global.viewToHighlight)

Conditional Colors

Show colors conditionally with ease:

MyView().foregroundColor(.red.if(myVal == 5))

Minor Changes

  • Added Animation.rampEaseIn and Animation.rampEaseOut
  • Added static UIDevice.bottomBarHeight property
  • Added a scale parameter to AnyTransition.pop(scale:)
  • Made the Wedge custom shape animatable
  • slickAnimation(value:delay:) now has a delay parameter

Bug Fixes

  • Fixed AnyTransition.pop