Coder Social home page Coder Social logo

viewpagercontroller's Introduction

ViewPagerController

Swift 4.1 Platforms iOS Xcode 9.3+

capture1

capture2

Features

  • Show header tab menu
  • Infinite scroll header tab menu
  • Infinite scroll contents view
  • Can add header view
  • Show header tab selected view (customizeable)
  • Can scroll header view or navigation bar (customizeable)

Demo

See demo on Appetize.io

Requirements

  • Xcode 9.3+
  • iPhone Portrait (iPad Not Supported)
OS Swift
v1.3.0 iOS 8+ 3.0
v2.0.x iOS 9+ 4.1

Installation

CocoaPods

ViewPagerController is available through CocoaPods. To install it, simply add the following line to your Podfile:

use_frameworks!

pod "ViewPagerController"

Carthage

To integrate ViewPagerController into your Xcode project using Carthage, specify it in your Cartfile:

github "xxxAIRINxxx/ViewPagerController"

License

MIT license. See the LICENSE file for more info.

viewpagercontroller's People

Contributors

xxxairinxxx 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

viewpagercontroller's Issues

I just want to dive deep to understand behind

Hello sir, I found your framework and it's works great in my project. But I really want to understand how your InfiniteScrollView works, I read the code but very confusing because it's very complex, can you give me some resource or document I can read about your approach to build this view
Thank you !

How to disable scrolling top menu

I want to disable the scroll menu. When users swipe right or left on the menu, I want it to just move to the next or previous one that menu. Do not move indefinitely.

Could not dismiss ViewPagerController

Hey there awesome work thanks for making this, I am running into this issue I am actively looking for solutions but I couldn't find one so can you please take a look at this:

simulator screen shot 15-oct-2016 6 21 24 am

I just added a close button to dismiss the view controller in NavSampleViewController.swift of your demo.
following is the code:

`self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "close", style: .Plain, target: self, action: #selector(popThis))

func popThis() {
self.navigationController!.dismissViewControllerAnimated(false, completion: nil)
}`

And the app crashes showing following error:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fc603014400 of class UITableView was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x60800002b980> ( <NSKeyValueObservance 0x60800005bf30: Observer: 0x7fc600c04200, Key path: contentOffset, Options: <New: YES, Old: YES, Prior: NO> Context: 0x0, Property: 0x60800005f650> )' *** First throw call stack: ( 0 CoreFoundation 0x000000010993934b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x000000010939a21e objc_exception_throw + 48 2 CoreFoundation 0x00000001099a2265 +[NSException raise:format:] + 197 3 Foundation 0x0000000108ed0451 NSKVODeallocate + 293 4 ViewPagerController 0x0000000108df673e _TToFC19ViewPagerController19ViewPagerControllerE + 526 5 libobjc.A.dylib 0x0000000109398a0a _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127 6 libobjc.A.dylib 0x00000001093a44de objc_destructInstance + 129 7 libobjc.A.dylib 0x00000001093a4510 object_dispose + 22 8 UIKit 0x0000000109f73a72 -[UIResponder dealloc] + 146 9 UIKit 0x0000000109efacc9 -[UIViewController dealloc] + 1920 10 ViewPagerController 0x0000000108df649c _TFC19ViewPagerController19ViewPagerControllerD + 108 11 ViewPagerController 0x0000000108df6522 _TToFC19ViewPagerController19ViewPagerControllerD + 34 12 Demo 0x0000000108d18fad _TToFC4Demo23NavSampleViewControllerE + 61 13 libobjc.A.dylib 0x0000000109398a0a _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127 14 libobjc.A.dylib 0x00000001093a44de objc_destructInstance + 129 15 libobjc.A.dylib 0x00000001093a4510 object_dispose + 22 16 UIKit 0x0000000109f73a72 -[UIResponder dealloc] + 146 17 UIKit 0x0000000109efacc9 -[UIViewController dealloc] + 1920 18 CoreFoundation 0x000000010999020e common_removeAllObjects + 254 19 CoreFoundation 0x000000010986d8c3 -[__NSArrayM dealloc] + 19 20 libobjc.A.dylib 0x00000001093aeb12 _ZN11objc_object17sidetable_releaseEb + 212 21 UIKit 0x0000000109efac95 -[UIViewController dealloc] + 1868 22 UIKit 0x0000000109f28ca6 -[UINavigationController dealloc] + 420 23 UIKit 0x0000000109ee23e4 -[UIPresentationController .cxx_destruct] + 262 24 libobjc.A.dylib 0x0000000109398a0a _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127 25 libobjc.A.dylib 0x00000001093a44de objc_destructInstance + 129 26 libobjc.A.dylib 0x00000001093a4510 object_dispose + 22 27 UIKit 0x0000000109edd968 -[UIPresentationController dealloc] + 56 28 UIKit 0x000000010a7c1b1a -[_UIFullscreenPresentationController dealloc] + 56 29 libobjc.A.dylib 0x00000001093aeb12 _ZN11objc_object17sidetable_releaseEb + 212 30 UIKit 0x0000000109edd68d __destroy_helper_block_.433 + 24 31 libsystem_blocks.dylib 0x000000010d3e2952 _Block_release + 102 32 UIKit 0x000000010a8a30c2 -[_UIViewControllerTransitionContext .cxx_destruct] + 94 33 libobjc.A.dylib 0x0000000109398a0a _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127 34 libobjc.A.dylib 0x00000001093a44de objc_destructInstance + 129 35 libobjc.A.dylib 0x00000001093a4510 object_dispose + 22 36 UIKit 0x000000010a8a18a6 -[_UIViewControllerTransitionContext dealloc] + 56 37 UIKit 0x000000010a8a3168 -[_UIViewControllerOneToOneTransitionContext dealloc] + 79 38 libobjc.A.dylib 0x00000001093aeb12 _ZN11objc_object17sidetable_releaseEb + 212 39 libsystem_blocks.dylib 0x000000010d3e2952 _Block_release + 102 40 UIKit 0x0000000109e16c05 -[UIViewAnimationBlockDelegate .cxx_destruct] + 43 41 libobjc.A.dylib 0x0000000109398a0a _ZL27object_cxxDestructFromClassP11objc_objectP10objc_class + 127 42 libobjc.A.dylib 0x00000001093a44de objc_destructInstance + 129 43 libobjc.A.dylib 0x00000001093a4510 object_dispose + 22 44 libobjc.A.dylib 0x00000001093aeb12 _ZN11objc_object17sidetable_releaseEb + 212 45 Foundation 0x0000000108ec33c5 __delayedPerformCleanup + 50 46 CoreFoundation 0x00000001098cbce6 CFRunLoopTimerInvalidate + 630 47 CoreFoundation 0x00000001098cb62a __CFRunLoopDoTimer + 1130 48 CoreFoundation 0x00000001098cb17a __CFRunLoopDoTimers + 250 49 CoreFoundation 0x00000001098c2f01 __CFRunLoopRun + 2065 50 CoreFoundation 0x00000001098c2494 CFRunLoopRunSpecific + 420 51 GraphicsServices 0x000000010f24fa6f GSEventRunModal + 161 52 UIKit 0x0000000109d5cf34 UIApplicationMain + 159 53 Demo 0x0000000108d1a3c2 main + 114 54 libdyld.dylib 0x000000010d39c68d start + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException

Also it seems to be crashing at the following line of the ViewPagerController.swift :

deinit { self.scrollViewObservingType = .none }

plans for Swift 3.0 and xcode 8

Hi,

First of all thanks for the awesome stuff you did. Its very useful. I was wondering if you have any plans on upgrading the codebase to swift 3.0?

Thanks

  • Cris

I can't disable infinite scroll

There is the possibility to disable the infinite scroll and show only the tabs that i insert ( in my case 2 tab ) ? Thanks

crash

setActiveContentIndex,
NSInternalInconsistencyException
No view controller managing visible view.

Avoid infinitive loop

How to avoid infinitive loop when I have only two tabs? How can I tell viewPagerController to take half of the parent width for each tab title?

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.