Giter Site home page Giter Site logo

uias / tabman Goto Github PK

View Code? Open in Web Editor NEW
2.8K 35.0 231.0 77.56 MB

™️ A powerful paging view controller with interactive indicator bars

Home Page: https://uias.github.io/Tabman

License: MIT License

Swift 97.24% Objective-C 0.20% Ruby 1.30% Shell 1.27%
ios swift viewpager tabs uitabbar uipageviewcontroller ui

tabman's People

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  avatar  avatar  avatar  avatar  avatar

tabman's Issues

Improve custom bar subclassing

Creating a TabmanBar subclass is currently a slightly bespoke and poorly thought out process. The following could be improved:

  • constructTabBar() should pass in the contentView for construction.
  • Remove the fatal errors for non-overridden functions as they are unnecessary.

Add tab bar style TabmanBar

Add a TabmanBar style which mirrors the appearance of UITabBar. It should offer a similar appearance, but offer enhanced transitions between items (progressive rather than snap). Should also probably be limited to 5 items.

PushNavigation Solution

Can you suggest any solution to push a view. Present work fine but pushing with navigationController does nothing

Disable Swipe/Scrolling

I'd like to be able to disable the page swiping. Swiping the tabs is fine, but it would be great if it was possible to disable the swiping of pages.

Method for specifying the location of the bar.

Hello,

I have a question about customizing the location of the bar. Is there a way to specify the location of where the bar is going to be placed? For example, in my view, I have a search bar that is bellow the navigation bar. I would then want to position the tab bar bellow the search bar.

Cocoapod error

pod install shows this error, when i try to install
[!] Unable to find a specification for Tabman

pod not working

i try using
pod 'Tabman' and
pod 'Tabman', '~> 0.4'

but both are not installing i get error using cocoapod installer
Analyzing dependencies
[!] Unable to find a specification for Tabman (~> 0.4)

Close button on tab

Is it possible to enable/configure appearance to have close buttons on each tab?

More State options

Have migrated from MSSTabbedPageViewController. Would like the ability, additional to setting colours, to set the font of the selected item and consequently of unselected items too (could do this previously). Great library by the way! I love it!

Remove the line under the bar

Hi,

Like I said in the title, I want to remove this little line under the bar of the .bar style. How is it possible? Thanks!

useRoundedCorners not working

Hi, seems useRoundedCorners property doesn't work.

I checked file TabmanBar.swif, line 288 update(forAppearance:defaultAppearance:) method there is no assigning

and

I checked TabmanLineIndicator.swift which is internal class, line 50 contains
TabmanBar.Appearance.defaultAppearance.indicator.useRoundedCorners ?? false, so basically you are taking value from defaultAppearance

maybe I got your code not correctly, but property useRoundedCorners for indicator is not working for me

Scrolling to top of scrollView when performing automatic insets

Hi,

I'm having an issue when using hidesBarOnSwipe in a navigation controller where swiping down to reveal the bar again causes insetChildViewControllerIfNeeded(_ childViewController: UIViewController?) to be called and the child scrollView moves to the top of the content.

It seems that this function is also adjusting the contentOffset, but I think there might be a bug. Is this line:

contentOffset.y = -requiredContentInset.top

meant to be:

contentOffset.y -= requiredContentInset.top

Making this change fixed the problem for me.

Thanks!

CocoaPods error

I got error message when I Install to pod 'Tabman'

Analyzing dependencies
[!] There are only pre-release versions available satisfying the following requirements:

'Tabman', '>= 0'

You should explicitly specify the version in order to install a pre-release version

PageViewController scrollView embed

Hi, is there way to embed pageViewController ? I found a way how to embed tabBar, but can't figure out how to move/embed pageViewController

What I'm trying to achieve:
---Tabbar container---
---My custom view (not scrollable)---
---Pages---

Also other screen has
---Custom view---
---Tabbar container---
---Pages---
This is one is working fine, but my pages are going under Custom view and tabbar container, I saw that there is way to have some inset (still trying), but it would be much easier to have ability to embed pageViewController to any view as tabbar.

Titel labels not using same font?

Hi.

Am i doing something wrong or is this an error?

Currently im setting the font to be UIFont.systemFont(ofSize: 16.0), but they differ in sizes - see screenshot.

screen shot 2017-06-14 at 08 39 00

Style is buttonbar - let me know if you need more info :)

Automatically handle child controller insetting

In addition to the requiredContentInset property in TabmanBarConfig, Tabman should automatically handle insetting child view controllers within the page view controller.

This should also be able to be disabled via an opt-out property in TabmanViewController.

Example code not working

Dependencies frameworks are missing in example code. can you please create example code with all required framework so we can test it before integrating in our real-time project.

Thanks

Support for 2 lines

How to handle the native behaviour on android which layout on 2 lines the tabBar text if too long ?

Example code seems to be referencing old function names

I noticed that the example code (specifically https://github.com/uias/Tabman/blob/master/Example/Tabman-Example/CustomTabmanBar.swift) is using function names that don't correspond to the superclass. I have the pod in my project on my machine and have looked at the TabmanBar.swift file, where the function names seem to be constructTabBar and addIndicatorToBar instead of construct and add. I think the example code needs to be updated.
Thank you!

Tableview Insets Odd Behavior

I have the strangest issue I can't seem to figure out. My tableview insets are set so the cells do not appear under my tab bar, but the top initially appears about twice as low as I have it set - until I touch the view. After touching, it scrolls into position and is fine from that point forward. Any advice?

self.tableView.contentInset = UIEdgeInsetsMake(120, 0, -120, 0)

simulator screen shot apr 20 2017 3 57 07 pm

simulator screen shot apr 20 2017 3 57 14 pm

Retain cycle

Hello. I have found retain cycle between TabmanViewController and TabmanBarConfig. They keep each other in loadView method. This cycle is similar one as in your Pageboy project in which i had created issue few minutes ago. Could you make delegate property in TabmanBarConfig as weak? Thank you.

open override func loadView() {
        super.loadView()
        
        self.delegate = self
        self.bar.delegate = self
        
        // add bar to view
        self.reloadBar(withStyle: self.bar.style)
        self.updateBar(withLocation: self.bar.location)
    }

pageViewController is nil when delegate is set

Hello,

I have followed the instructions at the main page, but once I set the dataSource in the viewDidLoad the self.reloadPages() in PageboyViewControllerDataSource is executed but it is trying to reference the pageViewController which is nil at that moment.

Bug line: 27 of PageboyControllerManagement.swift
Pods: Tabman 0.4.8, Pageboy 1.0.4, PureLayout 3.0.2

TabmanViewController :

class TimeLockViewController: TabmanViewController, PageboyViewControllerDataSource  {

var mainView = TimeLockView()
var child:Children!

//Rx
let disposeBag = DisposeBag() // Bag of disposables to release thvarwhen view is being deallocate

//Mvvm

init(child: Children) {
    super.init(nibName: nil, bundle: nil)
    self.child = child
    self.setupNavigation()
}

required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
}

override func loadView() {
    self.view = mainView
}

override func viewWillAppear(_ animated: Bool) {
    self.setupNavigation()
}

override func viewDidLoad() {
    super.viewDidLoad()
    self.dataSource = self
    self.embedBar(inView: self.mainView)
    
    self.setupMvvm()
    self.setupRx()
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}


fileprivate func setupNavigation() {
    self.navigationItem.title = child.name ?? ""
}

fileprivate func setupMvvm(){
    
}

fileprivate func setupRx(){
    
}

func viewControllers(forPageboyViewController pageboyViewController: PageboyViewController) -> [UIViewController]? {
    // return array of view controllers
    let viewControllers = [UIViewController(), UIViewController()]
    
    // configure the bar
    self.bar.items = [TabmanBarItem(title: "Page 1"),
                      TabmanBarItem(title: "Page 2")]
    
    return viewControllers
}

func defaultPageIndex(forPageboyViewController pageboyViewController: PageboyViewController) -> PageboyViewController.PageIndex? {
    // use default index
    return nil
}

}

Removing PureLayout Dependency

I would like to propose of removing PureLayout framework from this project.
I can make a pull request for changing to normal constraint without using PureLayout.

Pod update

Could you update podspec and set Pageboy dependency version as 1.0.1. You have fixed retain cycle in both of them but Tabman uses old version of Pageboy

open minimumItemWidth

Hi,

I'm using scrollingButtonBar style, I found that you are using TabmanScrollingButtonBar.swift for this. I'm happy with that behavior, but only thing I need is to set minimumItemWidth, now you have internal default value as 44.

I think it would be nice to have such property under layout property of bar Appearance

Thanks!

Tabman localization

after applying localization to my project when I switch language to arabic (right to left) the bar is jammed and not responding

Error when building a project with Tabman included

I built this framework with carthage.

Undefined symbols for architecture arm64:
  "direct field offset for Tabman.TabmanViewController.(bar.storage in _57F68DA9D23EDB616EF841D0392909A0) : Tabman.TabmanBarConfig?", referenced from:
      Tabman.TabmanViewController.bar.setter : Tabman.TabmanBarConfig in ViewController.o
      Tabman.TabmanViewController.(bar.materializeForSet : Tabman.TabmanBarConfig).(closure #1) in ViewController.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Set bar indicator to top

Hi,

I'm using the .bar style for my bar appearance. My issue is that the bar indicator is under the viewControllers. How can I put it above them? I tried to find it on my own but without result...

Otherwise, thanks m8 this git is so nice, good job!! ;)

Add segmented control styled TabmanBar

Add a TabmanBar style with the appearance of a UISegmentedControl. The bar should limit the amount of items it can display, and animate between tabs.

Error compiling develop using Carthage

Not sure where this currently sits but I am getting the error:

Undefined symbols for architecture x86_64:
  "direct field offset for Tabman.TabmanViewController.(bar.storage in _57F68DA9D23EDB616EF841D0392909A0) : Tabman.TabmanBarConfig?", referenced from:
      Tabman.TabmanViewController.bar.setter : Tabman.TabmanBarConfig in NavButtonBarViewController.o
      Tabman.TabmanViewController.(bar.materializeForSet : Tabman.TabmanBarConfig).(closure #1) in NavButtonBarViewController.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

When I add the line

github "uias/Tabman" "develop"

To my Cartfile

Thanks

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.