类似QQ消息条数拖拽消失动画效果的实现

类似QQ消息条数拖拽消失动画效果的实现

QQ消息条数拖拽过程,消息条数会消失动画的实现:【支持iOS5.0+ARC】

今天翻看github上看到此动画效果的demo: https://github.com/smallmuou/PPDragDropBadgeView

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',为PRTween.m和PRTweenTimingFunctions.m,添加编译标签'-fno-objc-arc' 
  • Done.

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

Usage    

  • Q: How to use PPDragDropBadgeView?
  • A: Very simple, you only follow the down code.

    类似QQ消息条数拖拽消失动画效果的实现_第1张图片
    
  • 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;

你可能感兴趣的:(类似QQ消息条数拖拽消失动画效果的实现)