Coder Social home page Coder Social logo

tamanyan / swiftpagemenu Goto Github PK

View Code? Open in Web Editor NEW
368.0 8.0 61.0 4.83 MB

Customizable Page Tab Menu Controller ๐Ÿ‘

License: MIT License

Swift 98.77% Objective-C 0.44% Ruby 0.79%
ios swift tabs pager infinite customizable menu ios-ui ios-libraries carthage

swiftpagemenu's People

Contributors

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

swiftpagemenu's Issues

How to empty the tableview when API response has no data?

I am loading the data into the table view from the API and the tab menu is dynamic too. When the API response doesn't have any data, then we are able to remove the tab menu but not able to empty the table view. So how can we empty the table view?

Deployment Target

Can we remove/reduce the deployment target to 10+? I don't see any code which requires 12+ deployment target.
It helps for people with a minimum target of less than 12.

View Controller not displayed

i used this function from data source to display :

 func viewControllers(forPageMenuController pageMenuController: PageMenuController) -> [UIViewController] {
   let storyboard = UIStoryboard(name: "Main", bundle: nil)
        let controller = storyboard.instantiateViewController(withIdentifier: "HomeViewController")

        return [controller ]
    }

but nothing shows up .

Error UI when tabTitles count = 1

In default, my tabTitles have 1 item.
When request API success, I am going to insert the data of API to tabTitles
In case fail, I don't insert data to my tabTitles.
When my tabTitles have 1 item, my UI is error.
Please fix it.

custom tableview

hi,

I am new to iOS. i am trying to implement your menuview in my project. i have a table view in my storyboard. pls tell me how to implement my custom tableview in childview controller.

Cursor move animation

I start using this framework. It's great.

How can I set up sliding cursor? Now cursor is hidden or shown. I want to do animation for a move of a cursor.

Strange behaviour when using TabBarController

I have UITabBarController using a storyboard and add a PageTabMenuViewController. I populate items and titles in the init?(coder aDecoder: NSCoder).

It runs and works fine but with a warning "UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). "

The issue is that PageTabMenuViewController has no reference to the TabBarController so something like self.tabBarController!.tabBar will crash. It also causes its tab bar icon and label to disappear.

swiftpagemenu

Not able to call pageMenuController(_ pageMenuController: PageMenuController, didSelectMenuItem index: Int, direction: PageMenuNavigationDirection)

I am using this PageMenuController. And i have on table view on did select method i used notification center to trigger this delegate method.But not able to pass the int value:

@objc func overAllSelect(notification: NSNotification) {
   if let val = notification.userInfo?["index"] as? Int {
       
       pageMenuController(_pageMenuController: PageMenuController, didSelectMenuItem index: val, direction: PageMenuNavigationDirection)
       }
   }

Load PageMenuController with no title/controller items after it has already loaded some items before

is it possible to load the PageMenuController with no items after we've loaded it with items before? reloadPages is allowed to reload with a decreasing amount of title/controller items but the lib does not seem to allow me to remove the last menu item and corresponding controller.

is there some logic in the lib preventing the removal of the last item?

is there a minimum requirement for the amount of menu titles/controllers for a PageMenuController after it has been created with items before? if so, is this minimum adjustable?

Trying to create nested page menu with datasource delegate

Hey tamanyan,

Was just wondering if it was possible to create a nested page menu controller similar to Spotify's Music Podcasts Menu in your library.

IMG_DF80B9305538-1

    func viewControllers(forPageMenuController pageMenuController: PageMenuController) -> [UIViewController] {
        
        return self.items.map(ChildViewController.init)
        
    }

In the pageMenuControllerDataSource delegate method we can assign the View Controller. However It only takes a UIViewController and not a PageTabMenuViewController. Any kind of help would be appreciated. Thanks!

How can I add offset from top?

Hello! First of all, big thanks for your product. Very good library, but I haven't found the ability to add the top offset for page menu.

How can I layout page menu on viewController's view with other views?

Dynamic Tab Name Change

My Requirement is appending an array count just after the tab name like this.
Ferthdod (7), Ga (8), Mor'gol (19)
These counts get after calling web services.

Objective-C support needs

I am going to contribute some budget if you could make it to be able to use with my objective-c project.

can not init from storyboard

please change in your project file PageMenuController to

    required public init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented, use init(coder: options:)")
    }
    
    public init?(coder: NSCoder, options: PageMenuOptions? = nil) {
        self.options = options ?? DefaultPageMenuOption()
        super.init(coder: coder)
    }

This makes it possible to do
subclased PageMenuController where can use

    required public init?(coder: NSCoder) {
        super.init(coder: coder, options: PageMenuUnderlinePagerOption())
    }

Swift 4.1

Xcode 9.3, Swift 4.1

import SwiftPageMenu //<- Error: Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1: /Users/yury/Developer/.../Carthage/Build/iOS/SwiftPageMenu.framework/Modules/SwiftPageMenu.swiftmodule/x86_64.swiftmodule

/Users/yury/Developer/.../ViewController/Common/Tabbars/UnderlinePagerOption.swift:10:8: Module compiled with Swift 4.0.3 cannot be imported in Swift 4.1: /Users/yury/Developer/.../Carthage/Build/iOS/SwiftPageMenu.framework/Modules/SwiftPageMenu.swiftmodule/x86_64.swiftmodule

$ carthage update --platform iOS
...
*** Building scheme "SwiftPageMenu" in SwiftPageMenu.xcworkspace
Build Failed
Task failed with exit code 65:
/usr/bin/xcrun xcodebuild -workspace /Users/yury/Developer/.../Carthage/Checkouts/SwiftPageMenu/SwiftPageMenu.xcworkspace -scheme SwiftPageMenu -configuration Release -derivedDataPath /Users/yury/Library/Caches/org.carthage.CarthageKit/DerivedData/9.3_9E145/SwiftPageMenu/1.2.2 -sdk iphoneos ONLY_ACTIVE_ARCH=NO BITCODE_GENERATION_MODE=bitcode CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/zf/qpdrm77s3ss7xcpycw681q4m0000gn/T/SwiftPageMenu SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO (launched in /Users/yury/Developer/.../Carthage/Checkouts/SwiftPageMenu)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/zf/qpdrm77s3ss7xcpycw681q4m0000gn/T/carthage-xcodebuild.MGAZA2.log

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.