Skip to content

4.0.0

Choose a tag to compare

@camosss camosss released this 11 Aug 07:36
· 16 commits to main since this release

Highlights

  • New name: the library is now SwiftUITabPager, and the main view type is TabPagerimport SwiftUITabPager, then TabPager(selection:items:content:label:). CocoaPods: pod 'SwiftUITabPager'.
  • Fixed: presetting a selection id (deep links, server-driven start tabs) now shows the correct page on first render — previously the tab bar highlighted the preset tab while page 0's content was displayed.
  • Fixed: contentIgnoresSafeArea now reaches page content — each page is hosted in its own hosting controller which re-applied the safe area inset internally, so the modifier had no visible effect.
  • Performance: page roots are no longer re-diffed at 60Hz+ while a swipe gesture is in flight.
  • Visual: the indicator is clipped to the tab bar bounds in the scrollable layout.

Breaking changes

  • The deprecated 2.x index-based initializer init(selectedIndex:initialIndex:items:content:tabTitle:) was removed — use id-based init(selection:items:content:label:) (see the README migration guide).
  • The default indicator is now a visible 2pt accent-colored underline. To remove it, apply .tabIndicatorStyle(.hidden).
  • onTabChanged delivers the selected item instead of an index, and no longer fires on reorders that keep the same selected item.