Skip to content

Releases: SwiftfulThinking/SwiftfulRouting

6.1.0

26 Apr 18:45
Compare
Choose a tag to compare

Complete refactor of entire framework. Tons of new features. Major upgrade 🥳

Highlights:

  • Segue to multiple screens at once
  • Add option to segue without animation
  • Dismiss screens by screen id
  • Dismiss screens up to screen id
  • Dismiss screens by count
  • Remove "Screen Flows" and implement "Screen Queue" (easier API)
  • Additional configurations for resizable sheets (background color, corner radius, etc.)
  • Additional configurations for modals (background colors, blurred backgrounds, etc.)
  • Add Transition support!
    • Transitions replace the current screen without performing a segue
  • Add Transition Queue
  • Add Module support!
    • Modules replace the entire screen hierarchy
  • Add Logging and Analytics support!
  • Swift 6 support
  • Drop support for iOS 15

See Readme for updated documentation.

New Contributors

Full Changelog: 5.3.6...6.1.0

Beta 6.1

20 Apr 17:22
Compare
Choose a tag to compare
Beta 6.1 Pre-release
Pre-release

Complete refactor of entire framework. Tons of new features 🥳

Checkout "development" branch.

Highlights:

  • Segue to multiple screens at once
  • Add option to segue without animation
  • Dismiss screens by screen id
  • Dismiss screens up to screen id
  • Dismiss screens by count
  • Remove "Screen Flows" and implement "Screen Queue" (easier API)
  • Additional configurations for resizable sheets (background color, corner radius, etc.)
  • Additional configurations for modals (background colors, blurred backgrounds, etc.)
  • Add Transition support!
    • Transitions replace the current screen without performing a segue
  • Add Transition Queue
  • Add Module support!
    • Modules replace the entire screen hierarchy
  • Add Logging and Analytics support!
  • Swift 6 support
  • Drop support for iOS 15

See Readme for updated documentation.

Full Changelog: 5.3.6...beta-6.1

5.3.6

22 Aug 15:08
Compare
Choose a tag to compare

Fix a crash within TransitionSupportViewBuilder when dismissTransition is called multiple times in immediate succession

Full Changelog: 5.3.5...5.3.6

5.3.5

06 Jun 01:33
02a6e29
Compare
Choose a tag to compare
  • Fixing bug where calling dismissScreenStack multiple on an app's Root View didn't work.

What's Changed

Full Changelog: 5.3.4...5.3.5

5.3.4

12 May 21:26
Compare
Choose a tag to compare
  • Add dismissOnBackgroundTap to modal configuration, to disable taps on background layer. Default value remains TRUE.

5.3.3

12 May 19:56
0d8b953
Compare
Choose a tag to compare
  • Fix bug: dismissModal did not work when accessed through Environment variables
  • Fix bug: when displaying multiple modals with background layers, each background was behind all of the modals. Now they are stacked where the background of the top-most modal is above the 2nd-highest modal.
  • Update Readme: include code for adding swipe-back gesture support within Dismiss section

5.3.2

04 Mar 15:47
Compare
Choose a tag to compare

Fix bug from 5.3.1 where swipe-back gesture doesn't render on TransitionSupportViewBuilder

5.3.1

02 Mar 03:23
dc16487
Compare
Choose a tag to compare

Minor updates. Compiler breaking changes:

  • showModal no longer supports BackgroundEffect
  • showModal useDeviceBounds has been renamed ignoreSafeArea
  • AlertOption has been renamed DialogOption

Multiple Modals

Details (Click to expand)

You can now display multiple modals simultaneously (previously 1). Modals have an optional ID field, which can later be used to dismiss the modal.

router.showModal(id: "top1") {
     Text("Sample")
}

// Dismiss top-most modal
router.dismissModal()

// Dismiss modal by ID
router.dismissModal(id: "top1")

// Dismiss all modals
router.dismissAllModules()

Transition View Builder

Details (Click to expand)

Wrap your view in a TransitionViewBuilder to transition the current screen's context. This will change the content without changing the parent View hierarchy (ie. using transitions and not traditional segues).

Set allowsSwipeBack to FALSE disable swipe-back behavior on the transitioned screen.
Set allowSimultaneous to FALSE to render only one view at a time.

TransitionSupportViewBuilder(router: router, allowsSwipeBack: Bool, allowSimultaneous: Bool) { transitionRouter in
     Text("Hello, world!")
          .onTapGesture {
               transitionRouter.showTransition(transition: .trailing) { _ in
                    Rectangle()
               }
          }
}
// Dismiss current transition
transitionRouter.dismissTransition()

Beta 6.0

23 Jan 00:56
f95e323
Compare
Choose a tag to compare
Beta 6.0 Pre-release
Pre-release

Transition Screen

Details (Click to expand)

Use a screen transition to replace the current screen with a new one. This is not the same as a segue and will deallocate the first screen entirely. This changes the current view without affecting the surrounding view hierarchy.

router.transitionScreen(.leading) { router in
     Text("Screen1.1")
}
router.transitionScreen(.trailing) { router in
     Text("Screen1.2")
}

Dismiss most recent transition.

router.dismissTransition()

Dismiss all transitions to root.

router.dismissAllTransitions()

Transition Module

Details (Click to expand)

Modules are high-level containers for your app, where each module has it's own View hierarchy. This will change the entire hierarchy in your app, dismissing the root NavigationView as well as all screens displayed on top. Use this for things like "show onboarding" vs "show tabbar".

router.transitionModule(id: "onboarding", .leading) { router in
     Text("Onboarding View")
}
router.transitionModule(id: "home", .trailing) { router in
     Text("Home View")
}

The user's last module ID will persist across app sessions. This is returned when creating a RouterView and can be used to restore the user's previous module.

RouterView(addNavigationView: true) { (router, lastModuleId) in
     if lastModuleId == "home" {
          Text("Home View")
     } else {
          Text("Onboarding View")
     }
}

Multiple Modals

Details (Click to expand)

You can now display multiple modals simultaneously (previously 1). Modals have an optional ID, which can later be used to dismiss the modal.

router.showModal(id: "top1") {
     Text("Sample")
}

// Dismiss top-most modal
router.dismissModal()

// Dismiss modal by ID
router.dismissModdal(id: String)

// Dismiss all modals
router.dismissAllModules()

5.1.0

17 Jan 02:23
f32b6fb
Compare
Choose a tag to compare

Major release. See updated ReadMe.

  • Add Router to SwiftUI Environment
  • Add Screen Flow support
  • Add onDismiss to all segues
  • Various code tweaks & refactoring

What's Changed

Full Changelog: 4.0.3...5.1.0