PPDragDropBadgeView

https://github.com/smallmuou/PPDragDropBadgeView

PPDragDropBadgeView is a badge view which able to drag and drop. Just like QQ 5.0 badge view.

PPDragDropBadgeView是一个badge视图,可以进行拖拽,像QQ5.0中的badge视图。

  • Support iOS 5.0+ ARC 支持 iOS5.0+ 以及ARC

Configure

  • Checkout PPDragDropBadgeView from github. 从github上查询PPDragDropBadgeView
  • Copy PPDragDropBadgeView folder to your project. 将PPDragDropBadgeView文件夹拖到你的项目当中
  • Go to 'TARGET' -> 'Build Phases' -> 'Complile Sources', add compliler flags '-fno-objc-arc' for 'PRTween.m' and 'PRTweenTimingFunctions.m' 到'TARGET' -> 'Build Phases' -> 'Complile Sources',添加编译标签'-fno-objc-arc'到 'PRTween.m' 与 'PRTweenTimingFunctions.m' 中
  • Done.

You can also refer to the example project provided by me.

你也可以直接参考这个我写的例子。

Usage

  • Q: How to use PPDragDropBadgeView? 怎么使用PPDragDropBadgeView?
  • A: Very simple, you only follow the down code. 非常简单,用下面的代码片段即可。

    PPDragDropBadgeView* badgeView \
    = [[PPDragDropBadgeView alloc] initWithSuperView:self.testView
    location:CGPointMake(0,0)
    radius:10.0f dragdropCompletion:^{
    NSLog(@"Drag drop done.");
    }];
    badgeView.text = @"6";
  • Q: Does it can be customized? 这个是否支持更多参数的定制呢?

  • A: Of course, you can set "location", "radius", "tintColor", "borderWidth", "borderColor". You can see the propertys provided by me. 当然,你可以设置“位置”,“半径”,“填充颜色”,“边框宽度”,“边框颜色”。你也可以设置以下我提供的一些属性。

    /** The location of badge view. */
    @property (nonatomic, assign) CGPoint location; /** The radius of badge view. */
    @property (nonatomic, assign) CGFloat radius; /** The completion block when drag drop done. */
    @property (nonatomic, copy) void(^dragdropCompletion)(); /** The tint color of badge view. Default is red */
    @property (nonatomic, strong) UIColor* tintColor; /** The border color of badge view. Default is clear */
    @property (nonatomic, strong) UIColor* borderColor; /** The border width of badge view. Default is 1.0f */
    @property (nonatomic, assign) CGFloat borderWidth; /** The text of badge view. */
    @property (nonatomic, strong) NSString* text;

History

  • v1.0 (March 30, 2015)

    • First release.

License

The code follows MIT Lisence.

Contact

If you have any questions with use it or found some bugs, you can mail to me. I will get back to you in time. The follow is my email address: lvyexuwenfa100@126.com

[翻译] PPDragDropBadgeView的更多相关文章

  1. 《Django By Example》第五章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者@ucag注:大家好,我是新来的翻译, ...

  2. 《Django By Example》第四章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:祝大家新年快乐,这次带来<D ...

  3. [翻译]开发文档:android Bitmap的高效使用

    内容概述 本文内容来自开发文档"Traning > Displaying Bitmaps Efficiently",包括大尺寸Bitmap的高效加载,图片的异步加载和数据缓存 ...

  4. 【探索】机器指令翻译成 JavaScript

    前言 前些时候研究脚本混淆时,打算先学一些「程序流程」相关的概念.为了不因太枯燥而放弃,决定想一个有趣的案例,可以边探索边学. 于是想了一个话题:尝试将机器指令 1:1 翻译 成 JavaScript ...

  5. 《Django By Example》第三章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:第三章滚烫出炉,大家请不要吐槽文中 ...

  6. 《Django By Example》第二章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:翻译完第一章后,发现翻译第二章的速 ...

  7. 《Django By Example》第一章 中文 翻译 (个人学习,渣翻)

    书籍出处:https://www.packtpub.com/web-development/django-example 原作者:Antonio Melé (译者注:本人目前在杭州某家互联网公司工作, ...

  8. 【翻译】Awesome R资源大全中文版来了,全球最火的R工具包一网打尽,超过300+工具,还在等什么?

    0.前言 虽然很早就知道R被微软收购,也很早知道R在统计分析处理方面很强大,开始一直没有行动过...直到 直到12月初在微软技术大会,看到我软的工程师演示R的使用,我就震惊了,然后最近在网上到处了解和 ...

  9. ASP.NET MVC with Entity Framework and CSS一书翻译系列文章之第一章:创建基本的MVC Web站点

    在这一章中,我们将学习如何使用基架快速搭建和运行一个简单的Microsoft ASP.NET MVC Web站点.在我们马上投入学习和编码之前,我们首先了解一些有关ASP.NET MVC和Entity ...

随机推荐

  1. Hibernate3.3.2_ID生成策略

    1,xml生成id generator:常用四个:native.identity.sequence.uuid. Annotation: 1,@GeneratedValue: a)自定义ID b)AUT ...

  2. GitHub注册和Git安装

    一.注册GitHub GitHub官方地址:https://github.com. 在浏览器中打开GitHub网址,通过首页进行注册,如下图所示. 二.安装Git Git官方下载地址:http://g ...

  3. php的session存放数组

    本文实例讲述了php使用session二维数组的用法 最普通的用法:一个变量名: $_SESSION['user'] = 0;echo $_SESSION['user']; 使用数组:代码如下: $_ ...

  4. JDK源码--ArrayList浅析

    先上别人的源码分析http://www.cnblogs.com/roucheng/p/jdkfenxi.html 这个链接也不错:http://www.jianshu.com/p/8d14b55fa1 ...

  5. 使用Jasperreporter生成入库出库单打印等报表操作

    项目需要打印报表:就是那种生成入库单,出库单等的操作.使用到的技术:使用iReport Designer5.1.0设计报表,使用struts2+jasperreporter生成最终填充数据的报表 首先 ...

  6. PTA (Advanced Level) 1023 Have Fun with Numbers

    Have Fun with Numbers Notice that the number 123456789 is a 9-digit number consisting exactly the nu ...

  7. eclipse下JAVA的搭建

    练手JAVA用eclipse比android studio快很多,android studio啥都好,就是太慢 参考资料:http://blog.csdn.net/21aspnet/article/d ...

  8. c#删除list中的元素

    public static void TestRemove() { string[] str = { "1", "2", "d", &quo ...

  9. 如何应用ASP.NET MVC中的分部视图

    概述: 在ASP.NET Web Form的开发经验中,对于User Control使用比较频繁,可以减少重复的代码,利于页面模块化,这个概念也被引入了ASP.NET MVC.即“分部视图”. 1.创 ...

  10. unity assetStore 常用插件

    常用插件 20180723============= 教程类 =============<Mecanim Example Scenes > 官方示例场景<Surivial Shoot ...