Skip to content

Releases: camosss/SwiftUITabPager

4.1.1

Choose a tag to compare

@camosss camosss released this 12 Aug 04:27

Documentation and CI only — no library changes since 4.1.0.

  • The demo clips in the README were uploaded as .mov, which an img tag cannot render, so the README showed broken images. Replaced with GIFs.
  • CI pinned a simulator model the GitHub runner image no longer ships, so every run failed before building. It now resolves whatever iPhone simulator the image provides.

4.1.0

Choose a tag to compare

@camosss camosss released this 12 Aug 03:04

Fixed

  • Selection could go stale on iOS 15 and 16. Before iOS 17, onChange hands the action closure a view value captured one update earlier, so removing the selected tab left selection pointing at an item that no longer existed while the pager displayed the first tab. Selection now resolves against the value onChange delivers.
  • A fixed tab bar could run off screen. Tabs were laid out with maxWidth: .infinity, so a label wider than its share pushed the bar past the trailing edge. Every tab is now pinned to an equal width and clipped inside its own tab. Debug builds warn once when a label cannot fit, with what to do about it.
  • Pages are given the full page area, so a background applied to page content covers the whole tab rather than just the content.

Changed

  • The bottom safe area is filled by default. A full-bleed page needs no setup; add .contentRespectsSafeArea() when the pager sits above a tab bar or toolbar and its content must not run underneath.

Internal

  • Selection rules and fixed-bar sizing moved into testable helpers, with 25 new unit tests covering them — including the iOS 15/16 regression above.
  • Sample app: Different Views now shows a List and a grid, Separator exposes live color/thickness/padding controls, and Fixed vs Scrollable keeps a separate selection per style.

4.0.0

Choose a tag to compare

@camosss camosss released this 11 Aug 07:36

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.