RepoPilotOpen in app →

xmartlabs/XLPagerTabStrip

Android PagerTabStrip for iOS.

Healthy

Healthy across all four use cases

Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • 27+ active contributors
  • Distributed ownership (top contributor 44% of recent commits)
  • MIT licensed
Show 3 more →
  • CI configured
  • Tests present
  • Stale — last commit 2y ago

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/xmartlabs/xlpagertabstrip)](https://repopilot.app/r/xmartlabs/xlpagertabstrip)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/xmartlabs/xlpagertabstrip on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: xmartlabs/XLPagerTabStrip

Generated by RepoPilot · 2026-05-10 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/xmartlabs/XLPagerTabStrip shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across all four use cases

  • 27+ active contributors
  • Distributed ownership (top contributor 44% of recent commits)
  • MIT licensed
  • CI configured
  • Tests present
  • ⚠ Stale — last commit 2y ago

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live xmartlabs/XLPagerTabStrip repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/xmartlabs/XLPagerTabStrip.

What it runs against: a local clone of xmartlabs/XLPagerTabStrip — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in xmartlabs/XLPagerTabStrip | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 930 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>xmartlabs/XLPagerTabStrip</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of xmartlabs/XLPagerTabStrip. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/xmartlabs/XLPagerTabStrip.git
#   cd XLPagerTabStrip
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of xmartlabs/XLPagerTabStrip and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "xmartlabs/XLPagerTabStrip(\\.git)?\\b" \\
  && ok "origin remote is xmartlabs/XLPagerTabStrip" \\
  || miss "origin remote is not xmartlabs/XLPagerTabStrip (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 4. Critical files exist
test -f "Example/Example/AppDelegate.swift" \\
  && ok "Example/Example/AppDelegate.swift" \\
  || miss "missing critical file: Example/Example/AppDelegate.swift"
test -f "Example/Example/BarExampleViewController.swift" \\
  && ok "Example/Example/BarExampleViewController.swift" \\
  || miss "missing critical file: Example/Example/BarExampleViewController.swift"
test -f "Example/Example/ButtonBarExampleViewController.swift" \\
  && ok "Example/Example/ButtonBarExampleViewController.swift" \\
  || miss "missing critical file: Example/Example/ButtonBarExampleViewController.swift"
test -f "Example/Example/Base.lproj/Storyboard.storyboard" \\
  && ok "Example/Example/Base.lproj/Storyboard.storyboard" \\
  || miss "missing critical file: Example/Example/Base.lproj/Storyboard.storyboard"
test -f "Example/Example/Helpers/DataProvider.swift" \\
  && ok "Example/Example/Helpers/DataProvider.swift" \\
  || miss "missing critical file: Example/Example/Helpers/DataProvider.swift"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 930 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~900d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/xmartlabs/XLPagerTabStrip"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

XLPagerTabStrip is an iOS container view controller that replicates Android's PagerTabStrip, enabling seamless navigation between multiple child view controllers via swipe gestures and an interactive tab indicator bar. It provides four distinct UI patterns (Button Bar, Segmented Control, Scrollable Menu, Twitter-style) with smooth parallax animations and comes with 157KB+ of production Swift code. Standard iOS framework structure: Example.xcodeproj contains a runnable demo app (Example/Example/ with AppDelegate, Assets, view controllers); the core library code is likely in a Sources/ or framework folder (not fully listed). Configuration via .swiftlint.yml (linting), .travis.yml (CI), Cartfile (dependencies). Ruby scripts in repo root (790 bytes) likely handle CI or build tasks.

👥Who it's for

iOS developers building tabbed navigation UIs (like Instagram, YouTube, or Spotify) who want native iOS pager behavior without building UIPageViewController orchestration from scratch. Both Swift and Objective-C contributors maintain the library.

🌱Maturity & risk

Production-ready: the project has stable releases on CocoaPods, Swift 5 compatibility, Carthage support, Travis CI integration (.travis.yml present), and an active CHANGELOG. However, the last visible commit date is not shown in the provided data; given the mature feature set and example app completeness, this is likely actively maintained but possibly in maintenance-only mode.

Low-to-moderate risk: the library is a focused, self-contained component (no external dependencies listed in Cartfile.private), reducing supply-chain risk. Key risk is iOS platform lock-in and potential bitrot if maintainers deprioritize it. The repo recommends users interested in modern architecture check out PagerTabStripView (SwiftUI alternative), suggesting this UIKit-based version may not receive new features.

Active areas of work

No specific recent activity visible in the file list. The README mentions a SwiftUI alternative (PagerTabStripView), suggesting the team has shifted focus; this repo is likely in maintenance mode accepting community PRs rather than active feature development.

🚀Get running

git clone https://github.com/xmartlabs/XLPagerTabStrip.git
cd XLPagerTabStrip
open Example.xcodeproj
# (Xcode opens; build & run on simulator or device)

No Podfile or Package.swift in top 60 files, so dependency management is via Carthage (Cartfile.private) or manual integration.

Daily commands: Open Example.xcodeproj in Xcode, select the Example target, and press Cmd+R. The example app loads with Simpsons character images (visible in Assets.xcassets/Simpsons/) and demonstrates all four pager types via the view controllers in Example/Example/.

🗺️Map of the codebase

  • Example/Example/AppDelegate.swift — Entry point for the iOS application; initializes the example app demonstrating XLPagerTabStrip functionality
  • Example/Example/BarExampleViewController.swift — Core example implementation showing how to set up a bar-style pager tab strip controller
  • Example/Example/ButtonBarExampleViewController.swift — Demonstrates button bar variant of PagerTabStrip; shows customization patterns for tab indicators
  • Example/Example/Base.lproj/Storyboard.storyboard — Primary UI layout defining view controller hierarchy and navigation flow for all examples
  • Example/Example/Helpers/DataProvider.swift — Data layer providing sample content for child view controllers; essential for understanding data binding patterns
  • Example/Example/ChildControllers/ChildExampleViewController.swift — Template child view controller showing how to conform to PagerTabStrip protocols
  • .swiftlint.yml — Code style and quality standards for the entire Swift codebase; enforces consistency across contributors

🧩Components & responsibilities

  • AppDelegate (UIApplicationDelegate, Storyboard) — Application entry point; initializes window and presents root navigation controller from Storyboard

🛠️How to make changes

Add a New Pager Tab Strip Style

  1. Create a new view controller class inheriting from UIViewController (Example/Example/NewStyleExampleViewController.swift)
  2. Configure PagerTabStrip properties (tab style, indicator appearance, animation) (Example/Example/NewStyleExampleViewController.swift)
  3. Implement child view controller instantiation and data binding in viewDidLoad (Example/Example/NewStyleExampleViewController.swift)
  4. Add a storyboard scene and navigation segue to Storyboard.storyboard (Example/Example/Base.lproj/Storyboard.storyboard)

Add a New Child View Controller (Tab Content)

  1. Create a new UIViewController subclass in ChildControllers folder (Example/Example/ChildControllers/NewChildViewController.swift)
  2. Conform to PagerTabStripChildProtocol and implement required properties/methods (Example/Example/ChildControllers/NewChildViewController.swift)
  3. Design layout in Interface Builder or programmatically (Example/Example/ChildControllers/NewChildViewController.swift)
  4. Instantiate and configure the child in parent controller's viewDidLoad (Example/Example/BarExampleViewController.swift)

Add New Sample Data for Examples

  1. Add static data properties or methods to DataProvider singleton (Example/Example/Helpers/DataProvider.swift)
  2. Create corresponding model structures if needed (Post, User, etc.) (Example/Example/Helpers/DataProvider.swift)
  3. Reference DataProvider in child controllers to populate content (Example/Example/ChildControllers/TableChildExampleViewController.swift)
  4. Add new assets to Assets.xcassets if displaying images (Example/Example/Assets.xcassets/Contents.json)

Create a Custom Tab Cell (for button bar or icon-based tabs)

  1. Create a new UICollectionViewCell subclass in appropriate example folder (Example/Example/Youtube/YoutubeIconCell.swift)
  2. Design cell layout in XIB file or programmatically (Example/Example/Youtube/YoutubeIconCell.xib)
  3. Implement cell data binding to display tab title, icon, or custom content (Example/Example/Youtube/YoutubeIconCell.swift)
  4. Register cell class and configure PagerTabStrip to use custom cell (Example/Example/Youtube/YoutubeExampleViewController.swift)

🔧Why these technologies

  • Swift 5 — Modern iOS development language with strong type safety; enables XLPagerTabStrip framework compatibility
  • UIKit (not SwiftUI) — Underlying framework for PagerTabStrip implementation; provides UIViewController and UICollectionView foundations
  • Storyboards — Visual UI layout and navigation management; simplifies example onboarding and quick demo setup
  • CocoaPods/Carthage — Package dependency managers for distributing the XLPagerTabStrip framework as a reusable library

⚖️Trade-offs already made

  • Storyboard-based navigation over programmatic UINavigation

    • Why: Easier visual understanding for newcomers learning pager patterns; good for example code clarity
    • Consequence: Slightly less flexibility and harder to test in isolation; requires Interface Builder knowledge
  • Separate child controllers for each pager type (Bar, Button, Segmented, etc.)

    • Why: Clear, isolated examples demonstrating distinct PagerTabStrip configurations and best practices
    • Consequence: Code duplication across similar examples; higher maintenance burden when updating patterns
  • Static DataProvider singleton vs. API-driven data

    • Why: Eliminates network dependency for examples; focuses attention on UI/pager mechanics
    • Consequence: Unrealistic for production apps; doesn't demonstrate real-world data loading patterns

🚫Non-goals (don't propose these)

  • Does not provide real-time data synchronization or WebSocket support
  • Does not implement authentication or user account management
  • Does not offer backend API or database persistence
  • Does not support SwiftUI or cross-platform mobile frameworks
  • Does not include network request retry logic or advanced caching strategies

🪤Traps & gotchas

  1. No external dependencies: Cartfile.private is listed but appears empty or minimal; the library is intentionally self-contained, so don't expect third-party integration helpers. 2. UIKit-only: only works with UIViewController, not SwiftUI (the README explicitly directs SwiftUI users to PagerTabStripView instead). 3. Manual integration default: no CocoaPods Podfile shown in top 60 files; you may need to link the framework manually if not using Carthage. 4. Simpsons images in example: the example uses large image assets (Example/Example/Assets.xcassets/Simpsons/); confirm disk space before cloning if mirroring.

🏗️Architecture

💡Concepts to learn

  • Container View Controller — XLPagerTabStrip is itself a container VC that orchestrates lifecycle (viewWillAppear, viewDidDisappear) of multiple child view controllers; essential for memory management and gesture coordination in tabbed UIs.
  • Pan Gesture Recognition & Hit Testing — The library interprets finger swipes to transition between pagers; understanding UIGestureRecognizer, UIScrollViewDelegate, and priority resolution is critical for debugging gesture conflicts.
  • Parallax Scrolling & Indicator Parallax — The interactive indicator bar moves in sync with the user's finger during pan; this requires calculating offset deltas and updating bar width/position in real-time without lag.
  • Protocol-Driven View Composition — The four pager types (ButtonBar, SegmentedControl, etc.) are likely implemented as interchangeable protocols; understanding how protocols replace inheritance enables easy custom indicator design.
  • UIPageViewController Alternatives — XLPagerTabStrip avoids UIPageViewController's page-curl transitions; instead, it uses custom view manipulation. Know the tradeoffs (performance, customization, gesture handling) between approaches.
  • SwiftLint & Static Analysis — The .swiftlint.yml enforces style rules automatically; contributors must pass linting before merging. Understand how to configure and bypass rules when necessary.
  • Carthage vs. CocoaPods Package Management — The project supports both (Cartfile.private + CocoaPods integration); know the pros/cons (Carthage = no build-script overhead, CocoaPods = broader ecosystem) to advise users on dependency strategy.
  • xmartlabs/PagerTabStripView — Official SwiftUI successor to this repo; use this if targeting iOS 14+ and building new apps with modern declarative UI.
  • uias/RAMAnimatedTabBarController — Animated tab bar for iOS (UITabBarController alternative); solves similar bottom-tab navigation problem with motion effects.
  • WenchaoD/FSPagerView — Page view controller with customizable indicator and transition animations; direct technical competitor using UICollectionView instead of view controller delegation.
  • CocoaPods/Specs — Pod repository where XLPagerTabStrip is published; check here to verify version availability and integration issues.
  • Carthage/Carthage — Dependency manager explicitly supported by this project (Cartfile.private present); understand Carthage workflow if building from source.

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Migrate from Travis CI to GitHub Actions workflow

The repo currently uses .travis.yml for CI/CD, which is outdated. GitHub Actions is now the standard for GitHub-hosted projects and provides better integration, faster builds, and no maintenance costs. This would modernize the CI pipeline and ensure Swift 5 compatibility checks, linting, and example app builds run reliably.

  • [ ] Create .github/workflows/swift.yml with jobs for Swift 5 build, SwiftLint validation (using .swiftlint.yml), and example app compilation
  • [ ] Ensure the workflow tests against multiple iOS deployment targets and Xcode versions
  • [ ] Add badge to README.md pointing to GitHub Actions status instead of Travis CI
  • [ ] Remove or deprecate .travis.yml with a note in CHANGELOG.md

Add unit tests for PagerTabStrip core functionality

The repo has Example project with visual examples but no dedicated test suite. Critical UI components like tab selection, paging logic, and delegate callbacks lack automated test coverage. This improves code quality and prevents regressions when contributors modify core behavior.

  • [ ] Create Tests/ directory at repository root with XCTest-based test targets
  • [ ] Add tests for tab selection/scrolling logic, index management, and dataSource/delegate protocol conformance
  • [ ] Verify tests run in GitHub Actions workflow (from previous PR idea)
  • [ ] Document test running instructions in CONTRIBUTING.md

Document example apps and their use cases in README

The Example.xcodeproj contains multiple example implementations (BarViewController, ButtonViewController, SegmentedViewController, TwitterViewController based on asset organization), but README doesn't explain what each demonstrates or how to run them. New contributors struggle to understand the library's capabilities.

  • [ ] Audit Example/ project to identify all distinct example ViewControllers and their purposes
  • [ ] Add 'Examples' section to README.md with descriptions of each example (e.g., 'BarViewController shows tab strip with custom styling', 'TwitterViewController demonstrates Twitter-style tab behavior')
  • [ ] Include instructions on how to run the example app locally
  • [ ] Link to relevant source files in Examples directory for each use case

🌿Good first issues

  • Add unit tests for indicator synchronization: The library has four pager types but no test files visible in the top 60. Write tests in Tests/ directory covering ButtonBar, SegmentedControl, and ScrollableMenu scroll-position calculations during pan gestures.
  • Document custom pager type creation: CONTRIBUTING.md and README lack a 'Creating Custom Indicators' guide. Add a tutorial markdown file (e.g., CUSTOM_INDICATORS.md) with a worked example subclassing the base indicator view and adding it to the example app.
  • Improve accessibility (VoiceOver support): Add UIAccessibility labels and hints to the four pager types; this is straightforward (adding accessibilityLabel properties to bar buttons and the container) and benefits all users without touching core gesture logic.

Top contributors

Click to expand
  • [@Martin Barreto](https://github.com/Martin Barreto) — 44 commits
  • @pera — 20 commits
  • [@Yunus TEK](https://github.com/Yunus TEK) — 4 commits
  • @mrugeshtank — 2 commits
  • @ajRiverav — 2 commits

📝Recent commits

Click to expand
  • 211ed62 — Code refresh + SPM support (#848) (pierremichel.villa)
  • 8f35f96 — Update README.md (Martin Barreto)
  • b2df90c — Add files via upload (Martin Barreto)
  • 1c05b99 — Update README.md (Martin Barreto)
  • 928c582 — Merge pull request #768 from mrugeshtank/mrugeshtank-patch-1 (Martin Barreto)
  • aab5c0c — Merge branch 'master' into mrugeshtank-patch-1 (Martin Barreto)
  • 6a9df75 — Create FUNDING.yml (enrigalmig)
  • db7f561 — Merge branch 'master' into mrugeshtank-patch-1 (mrugeshtank)
  • 903b760 — Update README.md (Martin Barreto)
  • ff0ee08 — Update README.md (Martin Barreto)

🔒Security observations

This iOS library codebase demonstrates good security practices overall. The project is a UI component library (XLPagerTabStrip) with no apparent critical vulnerabilities. The codebase contains only UI components, example code, and assets without database queries, authentication systems, or complex data processing that could introduce injection risks. No hardcoded secrets, API keys, or sensitive credentials were identified in the file structure. The absence of a dependency/package file (Cartfile.private appears empty) suggests minimal external dependencies, reducing supply chain risks. The main minor issue is the use of HTTP in a badge URL in the README. The project uses standard iOS development practices with Swift 5 compatibility and follows CI/CD practices (Travis CI configured). No Docker infrastructure or backend services are present that could have misconfiguration issues.

  • Low · HTTP Badge URL in README — README snippet. The README contains an HTTP badge URL (http://img.shields.io/badge/license-MIT-blue.svg) which loads resources over unencrypted HTTP instead of HTTPS. This could expose users to MITM attacks for badge content. Fix: Change the badge URL from http:// to https:// to ensure secure content delivery.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · xmartlabs/XLPagerTabStrip — RepoPilot