Giter VIP home page Giter VIP logo

msanimationdemo's Introduction

MSAnimationDemo

仿写A-GUIDE-TO-iOS-ANIMATION

MSQQbubble

封装成一个单独的view 可以在tableViewCell中使用,其中MSBadgeView 可单独作为没有交互功能的未读消息view使用 image

使用方法:

        MSBubbleView *bView = [[MSBubbleView alloc]initWithFrame:CGRectMake(200, 11, 60, 30) bubbleColor:[UIColor redColor] titleColor:[UIColor whiteColor] fontSize:18.0 alignMode:(MSBadgeViewAlignRight)];
        [cell addSubview:bView];
        bView.seperateScale = 0.3;
        bView.badge = [NSString stringWithFormat:@"%ld",indexPath.row];

-可以自定义气泡的对齐方式

-根据字体大小自适应气泡大小

-气泡爆炸消失时的动画采用gif实现,可以提供自定义的gif替换默认的爆炸消失动画

//爆炸消失动画在MSBubbleAnimationView.m 中定义
#pragma mark -layLoading
- (NSMutableArray *)destoryImages {
    if (!_destoryImages) {
        _destoryImages = [NSMutableArray array];
        for (int i = 1; i < 9; i++) {
            UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"%d", i]];
            [_destoryImages addObject:image];
        }
    }
    return _destoryImages;
}

-使用圆角优化来设置view的圆角(其实对view影响不大)

        //设置圆角
//        self.layer.backgroundColor = bubbleColor.CGColor;
//        self.layer.cornerRadius = _diameter/2.0;
        //对圆角进行优化,采用下列方法设置圆角 https://github.com/raozhizhen/JMRoundedCorner
        [self setJMRadius:(JMRadiusMake(_diameter/2.0, _diameter/2.0, _diameter/2.0, _diameter/2.0)) withBackgroundColor:bubbleColor];
        [self addSubview:_bubbleLabel];

msanimationdemo's People

Contributors

liwendeng avatar

Watchers

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