All Projects β†’ robertherdzik β†’ Rhsidebuttons

robertherdzik / Rhsidebuttons

Licence: mit
Library provides easy to implement variation of Android (Material Design) Floating Action Button for iOS. You can use it as your app small side menu. 🌢

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Rhsidebuttons

Ngx Auth Firebaseui
Angular Material UI component for firebase authentication
Stars: ✭ 518 (+215.85%)
Mutual labels:  demo, material
Web
⚑️ Supercharged version of Create React App with all the bells and whistles.
Stars: ✭ 594 (+262.2%)
Mutual labels:  demo, material
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (+217.07%)
Mutual labels:  menu, buttons
Coordinatormenu
The library creates a floating menu like the app momo, vtcpay, wepay
Stars: ✭ 160 (-2.44%)
Mutual labels:  menu, floating
Dejajs Components
Angular components
Stars: ✭ 37 (-77.44%)
Mutual labels:  demo, material
Goindex
Index your Google Drive
Stars: ✭ 418 (+154.88%)
Mutual labels:  demo, material
Sidemenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less.
Stars: ✭ 5,267 (+3111.59%)
Mutual labels:  menu, sidemenu
SideMenuSwiftDemo
SideMenu in Swift with autolayout
Stars: ✭ 79 (-51.83%)
Mutual labels:  menu, sidemenu
React Floating Button Menu
A customizable floating action button menu that follows material design
Stars: ✭ 27 (-83.54%)
Mutual labels:  demo, material
Fapanels
FAPanels - Swift
Stars: ✭ 850 (+418.29%)
Mutual labels:  menu, sidemenu
Fitgrd
.fitgrd is the lightweight & sexy looking responsive grid for your next awesome website.
Stars: ✭ 329 (+100.61%)
Mutual labels:  demo, floating
Hhfloatingview
An easy to use and setup floating view for your app. 🎑
Stars: ✭ 93 (-43.29%)
Mutual labels:  menu, floating
Fabsmenu
A simple library to use a menu of FloatingActionButtons from Design Support Library that follow Material Design Guidelines
Stars: ✭ 324 (+97.56%)
Mutual labels:  material, menu
Material Viewpagerindicator
Dot-based Android ViewPager indicator with Material Design animations.
Stars: ✭ 511 (+211.59%)
Mutual labels:  demo, material
smart borders
awesomewm full titlebar functionality without sacrificing space
Stars: ✭ 51 (-68.9%)
Mutual labels:  floating, buttons
Fabrevealmenu Master
A general purpose android UI library to show a user show menu in accordance of Floating action button with material design guidelines.
Stars: ✭ 558 (+240.24%)
Mutual labels:  material, menu
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+1547.56%)
Mutual labels:  menu, sidemenu
Demo Progressive Web App
πŸŽ‰ A demo for progressive web application with features like offline, push notifications, background sync etc,
Stars: ✭ 798 (+386.59%)
Mutual labels:  demo, material
Material Bottom Nav
A bottom navigation bar adhering to the Material Design specification.
Stars: ✭ 41 (-75%)
Mutual labels:  material, menu
Xlslidemenu
iOS δ»ΏQQηš„ε·¦ε³ζŠ½ε±‰ζ•ˆζžœ
Stars: ✭ 122 (-25.61%)
Mutual labels:  menu, sidemenu

Version License Platform Language Twitter

RHSideButtons 🌢

Library provides easy to implement variation of Android (Material Design) Floating Action Button for iOS. You can use it as your app small side menu. 🌢

Play with it 😎

Installation

You can install RHSideButtons library using CocoaPods:

pod 'RHSideButtons'

or you can simply copy RHSideButtons folder to your project.

Usage

You just need implement RHSideButtonsDataSource and RHSideButtonsDelegate similar to well-known UIKit design.

// You need to firstly create trigger button. You can do this using block or your builder object which should conform to 'RHButtonViewConfigProtocol'
// RHTriggerButtonView allows you to change image for pressed state! πŸ‘ŒπŸ»
let triggerButton = RHTriggerButtonView(pressedImage: UIImage(named: "exit_icon")!) {
    $0.image = UIImage(named: "trigger_img")
    $0.hasShadow = true
}

// Then you need to create instance of SideButtons coordinator class with your View Controller view (it can be even TableView)
sideButtonsView = RHSideButtons(parentView: view, triggerButton: triggerButton)
sideButtonsView.delegate = self
sideButtonsView.dataSource = self

// When SideButtons controller is initialized properly you should set thier position in view in e.g. viewWillAppear method:
override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

    sideBttns?.setTriggerButtonPosition(CGPoint(x: bounds.width - 85, y: bounds.height - 85))
}

... let us prepare our data models for buttons πŸ’₯ below you can see one of many ways to do this:

//Finally you should create array of buttons which will feed our dataSource and Delegate methods :) e.g.:
let button_1 = RHButtonView {
    $0.image = UIImage(named: "icon_1")
    $0.hasShadow = true
}

let button_2 = RHButtonView {
    $0.image = UIImage(named: "icon_2")
    $0.hasShadow = true
}

let button_3 = RHButtonView {
    $0.image = UIImage(named: "icon_3")
    $0.hasShadow = true
}

buttonsArr.appendContentsOf([button_1, button_2, button_3])

//Similar as it is in TableView, now you should reload buttons with new values
sideButtonsView.reloadButtons()

πŸ’‘ important thing is that you need to reload buttons when your datasource has changed using reloadButtons() method (😱 simple right❓)

RHSideButtonsDataSource

func sideButtonsNumberOfButtons(sideButtons: RHSideButtons) -> Int
func sideButtons(sideButtons: RHSideButtons, buttonAtIndex index: Int) -> RHButtonView

RHSideButtonsDelegate

func sideButtons(sideButtons: RHSideButtons, didSelectButtonAtIndex index: Int)
func sideButtons(sideButtons: RHSideButtons, didTriggerButtonChangeStateTo state: RHButtonState)

Support for left-handers :)

If you decide to position RHSideButtons on the left site of view, buttons will dissapears to the left side of screen automatically.

e.g.:

sideBttns?.setTriggerButtonPosition(CGPoint(x:25, y: frame.size.height - 85))

Swift support

Library ver Swift ver
1.0 2.2
1.0.1 3.0
1.1.0 4.0

Check the Demo project

Please check out the demo project, you can see there what is the best (in my opinion πŸ€”) way to implement my buttons. Please keep in mind that Readme contains the simplest way to implement this control.

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].