Giter VIP home page Giter VIP logo

zlyspringbubble's Introduction

ZLYSpringBubble

ZLYSpringBubble 是一个仿 QQ 未读消息拖拽气泡的工具。

效果⬇️⬇️⬇️

ZLYSpringBubble 效果

安装

  1. CocoaPods
pod ‘ZLYSpringBubble’
  1. 直接安装

    直接拽入ZLYWaterWave.h和ZLYWaterWave.m文件

使用

    _bubbleView = [[ZLYBubbleView alloc] init];
    _bubbleView.rootCircleCenter = CGPointMake([UIScreen mainScreen].bounds.size.width / 2, 70);
    _bubbleView.rootCircleR = 8;
    _bubbleView.floatingCircleR = 12;
    _bubbleView.maxDistance = 150;
    _bubbleView.bubbleColor = [UIColor colorWithRed:0 green:0.4 blue:0.4 alpha:1];

可调节参数:

/** 最大距离,超过最大距离气泡会断开,默认 100 */
@property (nonatomic, assign) CGFloat maxDistance;

/** 根圆点半径,默认 10.0 */
@property (nonatomic, assign) CGFloat rootCircleR;
/** 可拖拽圆点半径,默认 15.0 */
@property (nonatomic, assign) CGFloat floatingCircleR;

/** 根圆点圆心,默认 (0,0) */
@property (nonatomic, assign) CGPoint rootCircleCenter;
/** 可拖拽圆点圆心,默认和根圆点圆心一致 */
@property (nonatomic, assign) CGPoint floatingCircleCenter;

/** 默认 red */
@property (nonatomic, strong) UIColor *bubbleColor;

/**
 重置
 */
- (void)reset;

具体还可以参考 Demo 中的示例。

反馈

如果有什么修改建议,可以发送邮件到 [email protected],也欢迎到我的博客一起讨论学习哟~

zlyspringbubble's People

Contributors

summertian4 avatar

Watchers

James Cloos 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.