Giter VIP home page Giter VIP logo

presentanimview's Introduction

PresentAnimView

iOS 动画队列-仿映客刷礼物效果

基础使用Demo:参考控制其中的代码

一、 将IM消息解析成礼物消息,拼出礼物 model

// 礼物模型
    GiftModel *giftModel = [[GiftModel alloc] init];
    giftModel.headImage = [UIImage imageNamed:@"luffy"];
    giftModel.name = msg.senderName;
    giftModel.giftImage = [UIImage imageNamed:@"flower"];
    giftModel.giftName = msg.text;
    giftModel.giftCount = 1;

二、 创建礼物管理类,设置礼物父视图

// 单例
AnimOperationManager *manager = [AnimOperationManager sharedManager];
manager.parentView = self.view;


三、 开始动画


// 用用户唯一标识 msg.senderChatID 存礼物信息,model 传入礼物模型
[manager animWithUserID:[NSString stringWithFormat:@"%@",msg.senderChatID] model:giftModel finishedBlock:^(BOOL result) {     
    }];        
    

Demo模拟了n个人同时送礼物

思路: iOS 动画队列-仿映客刷礼物效果

完善思路: iOS 基于 IM 实现仿映客刷礼物连击效果

presentanimview's People

Watchers

谭磊 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.