GithubHelp home page GithubHelp logo

endoumari / tabpageviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
1.4K 30.0 220.0 197 KB

Paging view controller and scroll tab view

License: MIT License

Ruby 4.41% Objective-C 1.67% Swift 93.92%
ios ui tab infinity-mode uipageviewcontroller

tabpageviewcontroller's Introduction

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

iOS13+

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.

tabpageviewcontroller's People

Contributors

ducnv-techlab avatar endoumari avatar hiragram avatar isseium avatar simorgh3196 avatar worlddowntown avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tabpageviewcontroller's Issues

current selected tab.

I have total 9 view controllers loaded.

The main container view has common search bar for all view controllers.

Now, whenever I search anything on search bar, I want to know which tab is currently selected.

How do I achieve this?

少ない数のタブメニューを画面いっぱいにしたい

例えばこのTabPageViewControllerにFirstとSecondの2つのViewControllerを入れたい場合、
2つだけの場合だとタブのFirstとSecondは左側に寄ってしまいますが、
これを各タブ均等な幅で、画面幅いっぱいに設定することはできますか?

displayControllerWithIndex is not working

displayControllerWithIndex is not working, when set it from different View Controller (i used the reference of TabPageViewController) , no errors but given index is not selected

Detect when tab VC is loaded

Is there a way to detect when a tab VC is being loaded each time a tab is pressed? Because viewWillApprear/viewDidAppear is not doing it for me.
I need this to update the navBar each time a tab is selected.
Thanks

Swift 3 compatibility

Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.

Thanks 😄

Missing onTabPressHandler equivalent for swipe

Hi,

I would like to be able to know if a user swiped, or clicked to go to another tab. Currently it only seems to be possible to use onTabPressHandler. Is there a way to know if a user swiped?

Thanks,

AP

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.

Right to left support

Does this library support display tabs from right to left?
To test that I just changed app default language to one of the RTL languages such as Arabic but it didn't work.
Is there is a workaround? I tried to reverse the list and set the current index equal to the last item but it didn't work too.

質問

IQONのアプリの様にUITabBarControllerでこちらのライブラリを扱う際の実装方法を教えて欲しいです。

Wrong TabView position when statusBar visibility change

I use NYTPhotoViewer to display full-screen photo viewer. This lib update visibility status of statusBar, and TabView does not update it's position correctly when statusBar show and hide. Please see attached image.

Thank you very much for creating this lib 🍡 🤗
img_3520

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.

image as tab

Hi, is it possible to set image as label tab?

Does not update tab bar ?

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

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

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.

Manual Installation

CocoaPods and Carthage are awesome tools and make our life really easier, but there are some devs who still don't know how to use them.

It would be cool to add the Manual installation guide in your README.md. You can take a look at my iOS Readme Template to see how you can do it.

Error IN Building Framework In cartage File

I got an error when installing carthage file...Below is Error Please Reply ASAP
Skipped building TabPageViewController due to the error:
Dependency "TabPageViewController" has no shared framework schemes

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.

Feature Wanted

I want to have the currentIndex change notify and want to read current index.Now I have to fork and modify myself.

How to get the index of the view controller tapped?

Implementing the TabPageViewController inside a Navigation Controller, how do I get the index that has been selected (so that I can configure the view controller that gets presented for that index)? Is there a delegate function for that?

How to embed the tabView in navigationBar

I want to embed the tabview in the navigationBar and also want to setup the leftbarbutton and the rightbarbotton,but the property of tabview is private,is hard to make override,hope to solve this problem.

master repo for Swift 4

Hoping you update the master repo for Swift 4.
(Seemingly you already have the branch and it works fine, though, why not yet?)

Please help to get this started.

Here is the step i took,
1)Install pod 'TabPageViewController'
2) code for my ViewCOntroller
`import UIKit
import TabPageViewController

class ViewController: TabPageViewController {

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


override func viewDidLoad() {
    super.viewDidLoad()



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


}

}`
Then I run and get error as attched.
screen shot 2019-02-06 at 9 52 20 am

Please help! thank you very much!!

example of how to add it to my custom ViewController

i have HelpViewController which has a custom navigation bar
so i want to add TabPageViewController into it or subclass it , i dont want to push it into the navigation controller
because my HelpViewController is coming from a side menu not a navigation process
is there any way that you can help me ?

CFBundleVersion is Invalid

こちらのライブラリを使用した際に、Bundle Versionが設定されていないため、
ビルドすることはできましたが、ストアにアップロードするためのバリデーションを通過することができませんでした。

TabPageViewControllerのinfo.plistを確認すると、bundle version に何も設定されていません。
ここに"1"など適当な数字をいれることで回避はできましたが、修正が必要かと思います。

2018-08-21 15 53 43

SDWebImageで似たような問題があったので参考として貼っておきます。
SDWebImage/SDWebImage#1780

Content Size

Hi!
This is cold!! but how can I set autoLayout or just simple the size of the content ?

thanks! 👍

add Image and Title

Adding title it's working but I had tried to add title and image how should i do
please guide me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.