Coder Social home page Coder Social logo

besttumi / wmdragview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zhengwenming/wmdragview

0.0 2.0 0.0 14.87 MB

拖吗?拖!拖就用WMDragView吧。WMDragView致力于让任意View都可以自由拖动。

License: MIT License

Objective-C 100.00%

wmdragview's Introduction

WMDragView

拖吗?拖!拖就用WMDragView吧。WMDragView致力于让任意View都可以拖动。

demo效果图:

image  应用场景1:image 应用场景2:image

#WMDragView:用法和API

1、把需要拖曳view的父类从原本继承UIView,改成继承WMDragView就OK了。

2、dragEnable=YES,可拖曳

dragEnable=NO,不可拖曳

3、freeRect可以任意设置活动范围,默认为活动范围为父视图大小frame,

4、回调block 点击的回调 ClickDragViewBlock 开始拖动的回调 BeginDragBlock 拖动中回调 DuringDragBlock 结束拖动的回调 EndDragBlock

5、isKeepBounds是不是又自动黏贴边界效果

isKeepBounds = YES,自动黏贴边界,而且是最近的边界 isKeepBounds = NO, 不会黏贴在边界,它是free(自由)状态,跟随手指到任意位置,但是也不可以拖出规定的范围

6、可以设置网络图片

7、可以自定义view加到dragView中,比如一个视频,一个自定义按钮等等。

欢迎加入iOS开发技术支持群,479259423,(3元付费群,手机端可以加,电脑加不了。慎入!)进群必须改名,群名片格式:城市-iOS-名字,例如广州-iOS-文明。

wmdragview's People

Contributors

zhengwenming avatar

Watchers

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