All Projects → speee → ScrollableTabController

speee / ScrollableTabController

Licence: MIT license
ScrollableTabController is tab based ContainerViewController with shrink-able upper content area.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to ScrollableTabController

ContainerView
Using Container View in iOS with Swift
Stars: ✭ 34 (+78.95%)
Mutual labels:  containerviewcontroller
Panels
Panels is a framework to easily add sliding panels to your application
Stars: ✭ 1,457 (+7568.42%)
Mutual labels:  containerviewcontroller

ScrollableTabController

MIT License Carthage compatible

ScrollableTabController is tab based ContainerViewController with shrinkable and expandable upper content area.

Demo

Requirement

iOS10+

Usage

Instantiation by code

let scrollableTabController = ScrollableTabController()

scrollableTabController.viewControllers = [
someScrollableViewController1,
someScrollableViewController2
]
scrollableTabController.upperContentViewController = someContentViewController

Restrictions for ContentViewControllers

There're some restrictions to use it properly.

UpperContentViewController

  • UpperContentViewController.view has to define its height with 900 to 950 constraints priority.
  • First, ScrollableTabController observes the height and set it as default height(the upper content height when the scrollable area is not scrolled).
  • Then when the user scrolls, the upper content area shrinks / expands,
  • The default view height(the height when the scrollable area is not scrolled) should be fixed when viewDidLoad is called. Changing the height is not supported.
  • If you want to allow users to scroll over upper content area, consider using TouchTransparentView that passes touch events to views below it.

ScrollableViewController

  • It has to conform to Scrollable protocol to make ScrollableTabController can observe scrolling.
  • Its scrollView.contentSize.height must not be smaller than scrollView.frame.height. If the contentSize.height is too small, the upper content area can't shrink. See the screenshot below.

  • priority 900 - 950
  • conflicting xx to achieve
  • example

Installation

Carthage

github "speee/ScrollableTabController"

Contribution

Welcome!!

Licence

MIT

Author

Mitsuyoshi Yamazaki

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].