Paging view controller and scroll tab view

Overview

TabPageViewController

License Language Version Platform Carthage compatible CocoaPods Awesome

Description

TabPageViewController is paging view controller and scroll tab view.

Screenshot

Infinity Mode

Limited Mode


Customization

Use TabPageOption

  • fontSize for tab item

fontSize: CGFloat

  • currentColor for current tab item

currentColor: UIColor

  • defaultColor for tab item

defaultColor: UIColor

  • tabHeight for tab view

tabHeight: CGFloat

  • tabMargin for tab item

tabMargin: CGFloat

  • tabBackgroundColor for tab view

tabBackgroundColor: UIColor

  • currentBarHeight for current bar view

currentBarHeight: CGFloat

  • pageBackgoundColor for tab page viewcontroller

pageBackgoundColor: UIColor

  • isTranslucent for tab view and navigation bar

isTranslucent: Bool

  • hides tabbar on swipe

hidesTabBarOnSwipe: Bool

Usage

import TabPageViewController to use TabPageViewController in your file.

Example

let tabPageViewController = TabPageViewController.create()
let vc1 = UIViewController()
let vc2 = UIViewController()

tabPageViewController.tabItems = [(vc1, "First"), (vc2, "Second")]

TabPageOption.currentColor = UIColor.redColor()

Infinity Mode

let tabPageViewController = TabPageViewController.create()
tabPageViewController.isInfinity = true

Requirements

iOS8+

Installation

Using CocoaPods

use_frameworks!
pod "TabPageViewController"

Using Carthage

github "EndouMari/TabPageViewController"

Manually

Copy all the files in Pod/Classes directory into your project.

Author

EndouMari

License

TabPageViewController is available under the MIT license. See the LICENSE file for more info.

Comments
  • Hide TabBar

    Hide TabBar

    Can you show me how can I hide TabBar (the horizontal scroll view) I want to hide it when pull down the tableview (to make more space for tableview's content) Please help me. Thank you.

    opened by ducnv55 5
  • Does not update tab bar ?

    Does not update tab bar ?

    TabPageViewController.displayControllerWithIndex(1, direction: .Forward, animated: false)?
    

    I want set current index for controller, but does not update tabbar?

    opened by roshanman 5
  • add option to hide Scroll tab and Navigation bar separately

    add option to hide Scroll tab and Navigation bar separately

    I forked your lib and fix this issue (Please look at what I commented at the bottom) Hide Scroll tab view

    I add another option in TabPageOption, named "hidesNavigationBarOnSwipe" When hidesNavigationBarOnSwipe == true, navigation bar will be hidden. When hidesNavigationBarOnSwipe == false, navigation bar will be shown.

    So we can hide Scroll tab and Navigation bar separately. (Currently, when you drag to hide Scroll tab, Navigation bar is hidden too)

    opened by ducnv55 4
  • Swift 3 Migration

    Swift 3 Migration

    iOS 10 was just released & we need to start making our apps ready for that. Please work on it or create a swift-3 branch & I'll send a PR. Thanks.

    opened by RigoOnRails 3
  • Fix bug occurs when tapping tabItem and swiping viewController at the same time

    Fix bug occurs when tapping tabItem and swiping viewController at the same time

    • Tap tabItem
    • Swipe or tap viewController immediately (before tabItem's animation has finished)
    • tabItem shows that Blue viewController is selected, but Red viewController is actually selected. (And after that, Yellow viewController disappears and be skipped)

    Sometimes app crashes but not every time.

    2017-06-02 14:05:39.322094 TabPageViewControllerDemo[5856:1863363] *** Assertion failure in -[TabPageViewController.TabPageViewController queuingScrollView:didEndManualScroll:toRevealView:direction:animated:didFinish:didComplete:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3600.6.22/UIPageViewController.m:2083
    2017-06-02 14:05:39.324377 TabPageViewControllerDemo[5856:1863363] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No view controller managing visible view <UIView: 0x115f10400; frame = (0 0; 375 667); autoresize = W+H; layer = <CALayer: 0x17403f060>>'
    *** First throw call stack:
    (0x191e151b8 0x19084c55c 0x191e1508c 0x1928cd02c 0x1984d8ae0 0x1985aacbc 0x1985aaa14 0x1985a6b38 0x1985a97b8 0x1985acac4 0x1985accec 0x1985a7aa8 0x197fde050 0x197e73370 0x197e72eac 0x19506af24 0x19506add0 0x192082094 0x191daae50 0x191dc3218 0x191dc29cc 0x191dc04b0 0x191cee2b8 0x1937a2198 0x197d357fc 0x197d30534 0x10004b624 0x190cd15b8)
    libc++abi.dylib: terminating with uncaught exception of type NSException
    

    To prevent this bug, I set tabPagerController.view.isUserInteractionEnabled to false in displayControllerWithIndex, then set to true when animation has been completed. This change works fine with my project currently.

    opened by hiragram 2
  • When isInfinty is true, cannot select tabs more than once

    When isInfinty is true, cannot select tabs more than once

    Sorry for writing in Japanese.

    いつも使わさせていただいております。日本語で失礼します。

    この度、動作環境を xcode 8.3, swift 3.1 にして 0.2.6 にバージョンアップしたところ、 isInfinity が true だと 2回目か3回目くらいにタブが選択できなくなりました。

    以下が動作キャプチャです。

    https://i.gyazo.com/190a4f02265d4795e8ff7038ea7cf4f5.mp4

    ソースコードを拝見しつつデバッグしたところ

    https://github.com/EndouMari/TabPageViewController/blob/master/Sources/TabView.swift#L258

    上記のif文をなくすと見た目上は正常に動作するようになりました。

    https://i.gyazo.com/107a8fdd661b02a414076e3a58350607.mp4

    深いところまでは追っていないのでこのif文を消すだけで問題がないか確認いただけますでしょうか。 このあとPRをお送りします。よろしくお願いします。

    == Automatic translation using Google translation

    I have upgraded the operating environment to xcode 8.3, swift 3.1 and upgraded it to 0.2.6, and when isInfinity is true, it becomes impossible to select the tab for the second time or the third time.

    The following is the operation capture.

    Https://i.gyazo.com/190a4f02265d4795e8ff7038ea7cf4f5.mp4

    Debugging while seeing the source code

    Https://github.com/EndouMari/TabPageViewController/blob/master/Sources/TabView.swift#L258

    If you omit the above if statement, it looks like it works normally.

    Https://i.gyazo.com/107a8fdd661b02a414076e3a58350607.mp4

    Since I am not chasing deeply, can you check whether there is no problem just by deleting this if statement? I will send you a PR after this. Thank you.

    opened by isseium 2
  • defaultContentOffsetX are not necessarily screen width

    defaultContentOffsetX are not necessarily screen width

    Hi, @EndouMari.

    I want to use this library in the width of several screen.

    For example,

    • Page Sheet
    • Form Sheet, etc.

    However, defaultContentOffsetX is width of the screen.

    Do you have any good ideas?

    opened by tomomura 2
  • Carthage error : Module file's minimum deployment target is ios8.3?

    Carthage error : Module file's minimum deployment target is ios8.3?

    I am using carthage for TabPageViewController, there is an import error message show: Module file's minimum deployment target is ios8.3? is it the minimum version? My environment: Xcode7.3 swift2.2 deployment target: iOS8.0

    opened by litt1e-p 2
  • Changing `tabItemsCount` from stored property to computed property

    Changing `tabItemsCount` from stored property to computed property

    I prefer to change tabItemsCount to computed property, because didSet does not fire when the property was initialized. So open var tabItems: [(viewController: UIViewController, title: String)] = [] does not trigger didSet. tabItemsCount will have incorrect value if you make initial value nonempty.

    opened by hiragram 1
  • Swift 3.0 compatibility

    Swift 3.0 compatibility

    Hi author. I just updated your library and an error has occurred (it works normal before). Module compiled with Swift 3.1 cannot be imported in Swift 3.0.2 image How can I use your library with Swift 3.0.2? Please help me.

    Thank you.

    opened by ducnv55 1
  • keep scrolling without releasing your finger, the title of the tab changes.

    keep scrolling without releasing your finger, the title of the tab changes.

    When I keep scrolling without releasing your finger, the title of the tab changes.

    I attach a gif file to a movie.

    movie

    Is there a solution to this problem?

    opened by GreenSpo 1
  • Retain Navigation Bar Appearance

    Retain Navigation Bar Appearance

    Following the Demo I was able to implement the TabPageViewController, but I would like to retain the system appearance of the nav bar (including the tab)

    This is what I got so far but I don't think it matches the default system appearance

    class TabPageViewController: TabPageViewController {
        
        override init() {
            super.init()
            
            // Configure the navigation bar
            /// Should I even need this?
            let appearance = UINavigationBarAppearance()
            appearance.configureWithTransparentBackground()
            navigationController?.navigationBar.standardAppearance = appearance
            
            // configure the VCs
            // [...] 
            
            option.isTranslucent = true
            option.tabBackgroundColor = UIColor.clear
            option.currentColor = UIColor(named: "AccentColor")!
        }
    }
    

    Any nudge in the correct direction?

    opened by PedroCavaleiro 0
  • Fix Right to left language support

    Fix Right to left language support

    I have added a simple fix for the right to left language support Like Arabic, Persian, Hebrew ...

    Fork: https://github.com/Dev-Khaled/TabPageViewController

    if you can merge it Thanks

    opened by Dev-Khaled 0
  • The tab bar doesn't fill to the top of the screen

    The tab bar doesn't fill to the top of the screen

    On some iPhones:

    スクリーンショット 2020-05-29 9 01 44

    There's a table view under the tab bar, and I can scroll the table view, such that the table view contents is visible between the top of the tab bar, and the top of the screen. Isn't the tab bar supposed to be extended to the very edge of the screen?

    opened by Sweeper777 0
Owner
M"e
M
A scroll pager that displays a list of tabs (segments) and manages paging between given views

ScrollPager A scroll pager similar to the one in Flipboard. The control creates a tabbar given a title or an image, and has the option of connecting t

Aryan Ghassemi 512 Aug 31, 2022
™️ A powerful paging view controller with interactive indicator bars

⭐️ Features Easy to implement page view controller with interactive indicator bars. Highly adaptable and powerful customization. Fully extensible with

UI At Six 2.5k Jan 2, 2023
A fully customizable container view controller to display a set of ViewControllers in a horizontal scroll view. Written in Swift.

DTPagerController This is a control for iOS written in Swift. DTPagerController is simple to use and easy to customize. Screenshots Default segmented

Tung Vo 290 Nov 13, 2022
A fun, easy-to-use tab bar navigation controller for iOS.

CircleBar Don’t you, sometimes, miss fun user interfaces? Truth is, we do. Sure, you can't use them in enterprise apps for obvious reasons, but if you

softhaus 786 Dec 25, 2022
A custom tab bar controller for iOS.

ESTabBarController ESTabBarController is a custom tab bar controller for iOS. It has a tab indicator that moves animated along the bar when switching

null 122 Oct 6, 2022
A custom tab bar controller for iOS written in Swift 4.2

A custom tab bar controller for iOS written in Swift 4.0 Screenshots Installation Cocoa Pods: pod 'AZTabBar' Swift Package Manager: You can use The Sw

Antonio Zaitoun 335 Dec 11, 2022
A flexible TabBarController with search tab like SNKRS.

PolioPager PolioPager is the easiest way to use PagerTabStrip including search tab in iOS. Written in pure swift. (日本語はこちら) Comparison SNKRS ↓↓↓↓ Poil

Yuiga Wada 176 Jan 7, 2023
Different Styles of Custom Tab Bar

LightCardTabBar An expiremental project exploring different types of custom-tabbar styles, screenshots as below. Screenshots Implementation The implem

Hussein Ryalat 31 Dec 23, 2022
Simplistic & unfinished recreation of MobileSafari's tab bar

SafariTabBar This is a simplistic recreation of the MobileSafari tab bar on iPad (prior to iPadOS 15). It is also very unfinished, and not intended in

Steven Troughton-Smith 51 Oct 26, 2022
📱 TabBar – highly customizable tab bar for your SwiftUI application.

TabBar SwiftUI standard TabView component is not so flexible and to customize it you have to modify appearance proxy of UITabBar or implement your own

Tamerlan Satualdypov 162 Jan 5, 2023
Aesthetic floating tab bar ––– SwiftUI & Combine ⛓️ Importable via Swift Package Manager 📦

FloatingTabBar An aesthetic floating tab bar made with SwiftUI & Combine importabable via Swift Package Manager ?? Based off BottomBar-SwiftUI Preview

10011.co 135 Jan 8, 2023
A prototype of custom tab bar using SwiftUI with techniques of mask + matchedGeometryEffect

SliderTabBar A prototype of custom tab bar using SwiftUI with techniques of mask

Ka Kui 1 Dec 24, 2021
Another UITabBar & UITabBarController (iOS Tab Bar) replacement, but uses Auto Layout for arranging it's views hierarchy.

GGTabBar GGTabBar is a simple UITabBar & UITabBarController replacement that uses Auto Layout for constructing the GUI. I created it for curiosity, bu

Nicolas Goles 157 Sep 26, 2022
Emoji Tab Bar button badges ✨

SuperBadges Add emojis and colored dots as badges for your Tab Bar buttons ✨ Usage Add an emoji badge: YourTabBarController.addDotAtTabBarItemIndex(

Oded Harth 55 Dec 13, 2021
📱 A minimal tab bar alternative

MiniTabBar A clean simple alternative to the UITabBar. Only shows the title when being tapped on. Gives the app a way cleaner look :) Requirements iOS

Dylan Marriott 155 Dec 20, 2022
Aesthetic floating tab bar ––– SwiftUI & Combine ⛓️ Importable via Swift Package Manager 📦

FloatingTabBar An aesthetic floating tab bar made with SwiftUI & Combine importabable via Swift Package Manager ?? Based off BottomBar-SwiftUI Preview

10011.co 134 Jan 5, 2023
iOS Top Tab Navigation

iOS-Top-Tab-Navigation Good news for all our users out there! Now there are no boundaries to your convenience, you can pass as much words as you want

MindInventory 14 Aug 3, 2022
Pager is the simplest and best way to implement sliding view controllers in Swift

Pager is the simplest and best way to implement sliding view controllers. Installation Drop in the Spring folder to your Xcode project. Or via CocoaPo

Lucas Oceano 234 Aug 5, 2022
A lightweight customized tabbar view. 📌

A lightweight customized tabbar view. Screenshots Features Installation Setup ToDos Credits Thanks License Screenshots Features Easily Configurable an

Hemang 137 Dec 16, 2022