MEVFloatingButton

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

Github星跟蹤圖

MEVFloatingButton

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

BuddyBuild
Version
License
Platform
Language

MEVFloatingButton

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 License.md

主要指標

概覽
名稱與所有者manuelescrig/MEVFloatingButton
主編程語言Objective-C
編程語言Objective-C (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2016-01-27 09:37:27
推送於2017-03-22 15:30:04
最后一次提交2017-03-22 16:30:04
發布數9
最新版本名稱1.3 (發布於 2016-08-17 14:30:08)
第一版名稱0.1.0 (發布於 )
用户参与
星數296
關注者數10
派生數39
提交數103
已啟用問題?
問題數10
打開的問題數4
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?