Giter Club home page Giter Club logo

floatingbuttonlike-gmail's Introduction

MEVFloatingButton

An iOS drop-in UITableView, UICollectionView, UIScrollView superclass category for showing a customizable floating button on top of it.

Version License Platform Language Build Status

![feb 22 2016 14 17](https://cloud.githubusercontent.com/assets/1849990/13462466/db001be6-e087-11e5-92a1-79c8ecefb715.gif)

Features

  • Multiple animation types.
  • Different display modes.
  • Different screen positions.
  • Customizable button icon.
  • Multiple delegate methods.

Demo

Demo App

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Requires iOS SDK version > 8.0

Installation


CocoaPods

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

pod 'MEVFloatingButton'
Manual

Simply include UIScrollView+FloatingButton.h and UIScrollView+FloatingButton.m from /Pod/Classes/ folder in your App’s Xcode project.

How to use


Step 1
#import "UIScrollView+FloatingButton.h"
Step 2

Add datasource and delegate methods.

@interface ViewController () <MEVFloatingButtonDelegate>
#pragma mark - MEScrollToTopDelegate Methods

- (void)floatingButton:(UIScrollView *)scrollView didTapButton:(UIButton *)button;
- (void)floatingButtonWillAppear:(UIScrollView *)scrollView;
- (void)floatingButtonDidAppear:(UIScrollView *)scrollView;
- (void)floatingButtonWillDisappear:(UIScrollView *)scrollView;
- (void)floatingButtonDidDisappear:(UIScrollView *)scrollView;
Step 3

Create a MEVFloatingButtonobject.

MEVFloatingButton *button = [[MEVFloatingButton alloc] init];
button.animationType = MEVFloatingButtonAnimationFromBottom;
button.displayMode = MEVFloatingButtonDisplayModeWhenScrolling;
button.position = MEVFloatingButtonPositionBottomCenter;
button.image = [UIImage imageNamed:@"Icon0"];
button.imageColor = [UIColor groupTableViewBackgroundColor];
button.backgroundColor = [UIColor darkGrayColor];
button.outlineColor = [UIColor darkGrayColor];
button.outlineWidth = 0.0f;
button.imagePadding = 20.0f;
button.horizontalOffset = 20.0f;
button.verticalOffset = -30.0f;
button.rounded = YES;
button.hideWhenScrollToTop = YES;

Set the object to your UIScrollView/UITableView/UICollectionView.

[self.tableView setFloatingButtonView:button];

Set the delegate.

[self.tableView setFloatingButtonDelegate:self]

Sample Project

For more info check the Examples project. Everything is there.

Change Log

See Changelog.md

Author

Manuel Escrig Ventura, @manuelescrig

Credits

Icons made by Elegant Themes from www.flaticon.com

License

MEVFloatingButton is available under the MIT license. See the LICENSE file for more info.

floatingbuttonlike-gmail's People

Contributors

manuelescrig avatar

Stargazers

renmoqiqi avatar  avatar

Watchers

James Cloos avatar Darshan  avatar

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.