Latest 2.2.0
Homepage https://github.com/miniLV/MNFloatBtn
License MIT
Platforms ios 8.0
Authors




demo示例

Installation

Manually

Just add the MNFloatBtn folder to your project

CocoaPods

Use CocoaPods with Podfile:

pod 'MNFloatBtn'
github "miniLV/MNFloatBtn"

Usage

  • The floating button is displayed in any case

    [MNFloatBtn show];

  • Display the floating button only in Debug mode (recommended)

    [MNFloatBtn showDebugModeWithType:MNAssistiveTypeNone];

  • remove floating button

    [MNFloatBtn hidden];
  • touch event
[MNFloatBtn sharedBtn].btnClick = ^(UIButton *sender) {

    NSLog(@" btn.btnClick ~");

};

Advanced usage

  • The current date is displayed by default
[[MNFloatBtn sharedBtn] setBuildShowDate:YES];
  • Configure the api environment display

#define kAddress            @"testapi.miniLV.com"
//#define kAddress            @"devapi.miniLV.com"
//#define kAddress            @"api.miniLV.com"

//Configure yourself - what api environment, what label to display
NSDictionary *envMap = @{
                         @"test":@"testapi.miniLV.com",
                         @"dev":@"devapi.miniLV.com",
                         @"pro":@"api.miniLV.com"
                         };

//Set different titles to be displayed in different environments, as well as the current Host
[[MNFloatBtn sharedBtn]setEnvironmentMap:envMap currentEnv:kAddress]; 


中文版使用说明

集成方法

1.CocoaPods : pod 'MNFloatBtn'

2.手动导入 : 拖入MNFloatBtn文件夹

使用方法

  1. 导入头文件,#import <MNFloatBtn/MNFloatBtn.h>
  2. 一行代码,显示悬浮按钮

  • 任何情况都显示悬浮按钮

    [MNFloatBtn show];

  • 仅在Debug模式下显示悬浮按钮(推荐使用)

    [MNFloatBtn showDebugModeWithType:MNAssistiveTypeNone];

  • 移除悬浮按钮在界面上显示

    [MNFloatBtn hidden];
  • 按钮点击事件
[MNFloatBtn sharedBtn].btnClick = ^(UIButton *sender) {

    NSLog(@" btn.btnClick ~");

};

进阶用法:

  • 默认显示当前日期

    [[MNFloatBtn sharedBtn] setBuildShowDate:YES];
  • 配置api环境显示

#define kAddress            @"testapi.miniLV.com"
//#define kAddress            @"devapi.miniLV.com"
//#define kAddress            @"api.miniLV.com"

//自己配置 - 什么api环境下,要显示什么标签
NSDictionary *envMap = @{
                         @"测试":@"testapi.miniLV.com",
                         @"开发":@"devapi.miniLV.com",
                         @"生产":@"api.miniLV.com"
                         };

//设置不同环境下,要展示的不同title,以及当前的Host
[[MNFloatBtn sharedBtn]setEnvironmentMap:envMap currentEnv:kAddress]; 

如果你在天朝,可以看这篇中文博客
文章介绍

Latest podspec

{
    "name": "MNFloatBtn",
    "version": "2.2.0",
    "summary": "A short description of MNFloatBtn.",
    "description": "'u4e00u884cu4ee3u7801u521bu5efau4e00u4e2au5168u5c40u60acu6d6eu6309u94aeuff0cu53efu4ee5u5febu901fu67e5u770bu5f53u524dAppu7248u672cu4fe1u606f'",
    "homepage": "https://github.com/miniLV/MNFloatBtn",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "miniLV": "https://github.com/miniLV"
    },
    "source": {
        "git": "https://github.com/miniLV/MNFloatBtn.git",
        "tag": "2.2.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "MNFloatBtn/MNFloatBtn.{h,m}",
        "MNFloatBtn/NSDate+MNDate.{h,m}"
    ],
    "resources": "MNFloatBtn/MNFloatBtn.bundle"
}

Pin It on Pinterest

Share This