All Projects β†’ emrepun β†’ Stickytabbarviewcontroller

emrepun / Stickytabbarviewcontroller

Licence: mit
Sticky and Collapsible View on top of tab bar

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Stickytabbarviewcontroller

React Native Bottomsheet Reanimated
React Native bottom sheet with fully native 60 FPS animations and awesome user experience
Stars: ✭ 80 (-2.44%)
Mutual labels:  bottomsheet, bottom-sheet
React Native Scroll Bottom Sheet
Cross platform scrollable bottom sheet with virtualisation support, native animations at 60 FPS and fully implemented in JS land πŸ”₯
Stars: ✭ 1,226 (+1395.12%)
Mutual labels:  bottomsheet, bottom-sheet
Bottomify Navigation View
A nice looking Spotify like bottom navigation view
Stars: ✭ 97 (+18.29%)
Mutual labels:  bottomsheet, bottom-sheet
Abexpandableview
Expandable, collapsible, filterable and single/multi selectable table view.
Stars: ✭ 138 (+68.29%)
Mutual labels:  ui-components, collapsible
BottomSheetBehavior
BottomSheetBehavior is an android library extracted from the Google I/O 2018 application source code.
Stars: ✭ 12 (-85.37%)
Mutual labels:  bottom-sheet, bottomsheet
Ubottomsheet
iPhone Maps App bottom sheet - A Protocol Oriented Approach
Stars: ✭ 259 (+215.85%)
Mutual labels:  bottomsheet, bottom-sheet
React Native Bottom Sheet
A performant interactive bottom sheet with fully configurable options πŸš€
Stars: ✭ 2,695 (+3186.59%)
Mutual labels:  bottomsheet, bottom-sheet
Stpopup
STPopup provides STPopupController, which works just like UINavigationController in popup style, for both iPhone and iPad. It's written in Objective-C and compatible with Swift.
Stars: ✭ 2,517 (+2969.51%)
Mutual labels:  ui-components, bottom-sheet
react-spring-bottom-sheet
Accessible ♿️, Delightful ✨, & Fast πŸš€
Stars: ✭ 604 (+636.59%)
Mutual labels:  bottom-sheet, bottomsheet
BottomSheet
BottomSheet lets you add custom bottom sheets to your SwiftUI apps.
Stars: ✭ 111 (+35.37%)
Mutual labels:  ui-components, bottomsheet
Bottomsheetpickers
Third-party date and time pickers for Android.
Stars: ✭ 1,099 (+1240.24%)
Mutual labels:  ui-components, bottom-sheet
Ibanimatable
Design and prototype customized UI, interaction, navigation, transition and animation for App Store ready Apps in Interface Builder with IBAnimatable.
Stars: ✭ 8,585 (+10369.51%)
Mutual labels:  ui-components
Yep React
yep react UI component η»„δ»Ά
Stars: ✭ 67 (-18.29%)
Mutual labels:  ui-components
P5.clickable
Event driven, easy-to-use button library for P5.js πŸ‘†
Stars: ✭ 66 (-19.51%)
Mutual labels:  ui-components
Tc Material Design
SΓ©rie de artigos sobre o Material Design Android
Stars: ✭ 64 (-21.95%)
Mutual labels:  bottomsheet
Flutter dojo
A beautiful design and useful project for Building a flutter knowledge architecture
Stars: ✭ 1,192 (+1353.66%)
Mutual labels:  ui-components
Fancyaccordionview
An Android fancy accordion view
Stars: ✭ 64 (-21.95%)
Mutual labels:  ui-components
Pure Css3 Animated Border
Pure CSS3 animated border for all html element.
Stars: ✭ 63 (-23.17%)
Mutual labels:  ui-components
Vue Mobiledoc Editor
A lightweight and customizable editor that allows you to embed rich content using Vuejs components.
Stars: ✭ 73 (-10.98%)
Mutual labels:  ui-components
Novo Elements
UI Repository for Bullhorn's Novo Theme
Stars: ✭ 59 (-28.05%)
Mutual labels:  ui-components

StickyTabBarViewController

Sticky and Collapsible View Controller on top of tab bar

Requirements:

  • iOS 10.0
  • Tab bar is visible as long as there is a sticky view controller allocated on top of it (any vc pushed at any point should not set hidesBottomBarWhenPushed to true.

Installation

StickyTabBarViewController is available through SPM and CocoaPods.

Simply add the following line to your Podfile:

pod 'StickyTabBarViewController', '1.0.5'

Usage

Subclass StickyViewControllerSupportingTabBarController from your tab bar controller.

Configure animation duration or collapsed view height directly from your tabbar controller:

From viewDidLoad:

import UIKit
import StickyTabBarViewController

class MainTabBarController: StickyViewControllerSupportingTabBarController {

    override func viewDidLoad() {
        super.viewDidLoad()
        collapsedHeight = 50.0
        animationDuration = 0.5
    }
}

By overriding initialisers of the tabbar controller:

override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
    super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
    // here if you are using xib
    collapsedHeight = 50.0
    animationDuration = 0.5
}

required init?(coder: NSCoder) {
    super.init(coder: coder)
    // configure also on required init (if you are using storyboard for example)
    collapsedHeight = 50.0
    animationDuration = 0.5
}

Can also update it any time by accessing to tabBarController.

Presented View Controller Configurations:

Any view controller to have sticky behaviour must conform to Expandable and implement a minimisedView.

The implemented minimisedView should be ideally anchored on top of the view controller's view and its height (either by a direct height constraint or some other constraints) should be equal to the value of collapsedHeight. You don't need to worry about hiding or showing it since it is handled by StickyTabBarViewController itself.

var minimisedView: UIView {
    return UIView() // or return your outlet for minimised view.
}

Collapse sticky view from the view controller that conforms to Expandable as following:

container?.collapseChild()

Expand sticky view from the view controller that conforms to Expandable as following:

container?.expandChild()

Remove sticky view from the view controller that conforms to Expandable as following:

container?.removeCollapsableChild(animated:)

Configure a Sticky child ViewController as following:

if let tabBarController = tabBarController as? StickyViewControllerSupportingTabBarController {
    let viewControllerToStick = SampleChildViewController()
    tabBarController.configureCollapsableChild(viewControllerToStick,
                                               isFullScreenOnFirstAppearance: true)
}

Interaction with the presented sticky child view controller from anywhere with tabBarController access:

Access tabBarController to interact with sticky child view controller:

var tabController: StickyViewControllerSupportingTabBarController? {
    if let tabBarController = tabBarController as? StickyViewControllerSupportingTabBarController {
        return tabBarController
    }
    return nil
}

Expand/collapse child view controller:

tabController?.collapseChild()
tabController?.expandChild()

Pending Improvements:

  • It would be nice to have the ability to hide tab bar and status bar upon expanding, in parameterised way.
  • Right now it is not possible to configure or overwrite the implemented sticky VC, one must first remove it and then implement another if needed. Maybe implement overwriting if configure is called while there is already a view controller allocated?
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].