Releases: camosss/SwiftUITabPager
Releases · camosss/SwiftUITabPager
Release list
4.1.1
Documentation and CI only — no library changes since 4.1.0.
- The demo clips in the README were uploaded as
.mov, which animgtag 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
Fixed
- Selection could go stale on iOS 15 and 16. Before iOS 17,
onChangehands the action closure a view value captured one update earlier, so removing the selected tab leftselectionpointing at an item that no longer existed while the pager displayed the first tab. Selection now resolves against the valueonChangedelivers. - 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
Highlights
- New name: the library is now SwiftUITabPager, and the main view type is
TabPager—import SwiftUITabPager, thenTabPager(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:
contentIgnoresSafeAreanow 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-basedinit(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). onTabChangeddelivers the selected item instead of an index, and no longer fires on reorders that keep the same selected item.