Giter Site home page Giter Site logo

minilv / mnfloatbtn Goto Github PK

View Code? Open in Web Editor NEW
189.0 5.0 27.0 1.2 MB

iOS全局悬浮按钮,显示 / 切换当前API环境与版本 ,掌握和测试撕逼主动权~

License: MIT License

Objective-C 92.51% Ruby 7.49%
ios floating-action-button assistivetouch floatbutton floating

mnfloatbtn's Introduction

Hi there 👋

This is miniLV,a rookie iOS/Mac developer. Now learning macos and swift.

I'm good at writing code that no one can understand, and creating bugs that no one can solve.

About Me

Blog:小蠢驴打代码

掘金:小蠢驴打代码

mnfloatbtn's People

Contributors

minilv avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mnfloatbtn's Issues

按钮移动事件会触发点击事件

问题现象:当拖拽按钮结束后,会触发点击按钮事件。
解决思路:当移动按钮时,对应的方法中判断是否进行移动。
// 当前按钮的坐标和起始位置坐标的判断 来确定是移动还是点击 误差为 x y 0.5
if (fabs(currentPosition.x - _touchPoint.x) > MoveErrorValue || fabs(currentPosition.y - _touchPoint.y) > MoveErrorValue ) {
isCanClicked = NO;
}
误差值可以根据情况进行改变。

多次调用 `presentViewController:animated:completion:` 会遮挡按钮

MNViewController.m 添加如下方法

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    OneViewController *nextVC = [[OneViewController alloc]init];
    
    [self presentViewController:nextVC animated:YES completion:nil];
}

第二次以及之后触摸屏幕,会导致悬浮按钮被遮挡。

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.