• Stars
    star
    642
  • Rank 70,096 (Top 2 %)
  • Language
    Swift
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS library - UIScrollView driven expandable menu.

AirBar

UIScrollView driven expandable menu.


Description

AirBar is a library for creating cool expandable menus. Library observes UIScrollView scroll and provides state you can apply to your UI elements.

Demo

AirBar Demo

Installation

Library supports Carthage dependency manager. To install AirBar add following line to Cartfile in the root folder of your project.

github "uptechteam/AirBar" ~> 2.0

Using CocoaPods add following line to your project Podfile

pod 'AirBar', '~> 2.0'

Using Swift Package Manager, add the following line to your Package.swift:

dependencies: [
  .package(url: "https://github.com/uptechteam/AirBar.git", .exact("2.0.6")),
],

How to use

  1. Create BarController object using BarController(configuration Configuration, stateObserver: StateObserver) initializer, where Configuration is struct that contains height config and StateObserver is closure that will be called on state change.

  2. Bind BarController to your UIScrollView object using set(scrollView: UIScrollView) method.

  3. Provide UI transformations in closure passed as StateObserver init argument. Closure will receive State object that has following public methods:

  • height() - returns bar height;
  • transitionProgress() - returns bar transition progress between 0 and 2, where 0 - compact state, 1 - normal state, 2 - expanded state;
  • value(compactNormalRange: ValueRangeType, normalExpandedRange: ValueRangeType) - returns transformed CGFloat value that can be used for configuring UIKit element properties. ValueRangeType is enum with .range(CGFloat, CGFloat) and .value(CGFloat) cases. You can use it for example if you need static value 1 in normal-expanded transition and range (0, 1) in compact-normal transition.
  1. (Optional) Contribute to repository.

Also you can find example application in library project.

Multiple UIScrollView objects

BarController supports using multiple UIScrollView objects. You can use preconfigure(scrollView: UIScrollView) method to configure scrolling view before setting it with set(scrollView: UIScrollView) method.

TODO

  • Implement expansion/concatination resistance;
  • ...

More Repositories

1

Coordinator-MVVM-Rx-Example

Example of MVVM-C architecture implemented with RxSwift
Swift
561
star
2

MotionViews-Android

Code Guide: How to create Snapchat-like image stickers and text stickers.
Java
479
star
3

react-filter-demo

Demonstration of how to implement search in large amounts of data (up to 2+ million rows) at frontend
JavaScript
130
star
4

ios-cookbook

Recipes for building the greatest products
Shell
69
star
5

CleanArchExample

Clean architecture in Android with Kotlin + RxJava + Dagger 2
Kotlin
40
star
6

fe-cookbook

Front-end department cookbook
29
star
7

default.wtf

JavaScript
28
star
8

SlidingRangeSelector

Swift
23
star
9

klarna-node

Node JS wrapper for Klarna payments system (Checkout, Order Management)
JavaScript
15
star
10

react-native-boilerplate

HTML
14
star
11

android-cookbook

The collection of best practices for the Android team
12
star
12

android-best-practices

Collection of Android Best Practices
8
star
13

VideoList

Kotlin
7
star
14

terraform-aws-setup-template

HCL
7
star
15

react-native-cookbook

6
star
16

FirebaseChat

Swift
6
star
17

Net

Swift
3
star
18

GetWoke

Swift
3
star
19

Pomodoro-Android

Kotlin
3
star
20

JASM

Just Another Side Menu for iOS. Written in Swift.
Swift
3
star
21

bildio

Android lib to help you with DI and AAC
Kotlin
2
star
22

fe-vitejs-template

TypeScript
2
star
23

android-ci-docker

Dockerfiles for Android CI
2
star
24

Repository-Sample

Kotlin
1
star
25

habitty

Swift
1
star
26

tslint-uptech

1
star
27

UPHubFragmentArch

Kotlin
1
star
28

ml-introduction

ML club introduction materials
Jupyter Notebook
1
star
29

time-timer-app

Time Timer React Native App
JavaScript
1
star
30

git-cycle-time

A CLI tool to calculate Cycle Time based on Git history
JavaScript
1
star
31

Android-Project-Template

Extension for Android Studio to create Android project from custon template
FreeMarker
1
star
32

Uptech-iOS-Helpers

iOS helper library that contains commonly used code in Uptech iOS projects.
Swift
1
star
33

KotlinRxSocket

Android library based on Socket.IO to simplify sockets implementation with RxJava
Kotlin
1
star
34

rubbot

Ruby
1
star