0.4.0
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
andAnimation.rampEaseOut
- Added static
UIDevice.bottomBarHeight
property - Added a
scale
parameter toAnyTransition.pop(scale:)
- Made the
Wedge
custom shape animatable slickAnimation(value:delay:)
now has adelay
parameter
Bug Fixes
- Fixed
AnyTransition.pop