Code Monkey home page Code Monkey logo

zranimation-master's Introduction

ZRAnimation

效果演示

简单使用

// 心形生日快乐
- (void)showHeartBirthdayViewController {
    ZRBirthdayHeartModel *birthdayModel = [[ZRBirthdayHeartModel alloc] init];
    birthdayModel.birthdayTitle = @"亲爱的戎马天涯";
    birthdayModel.birthdaySubTitle = @"我公司精心为您准备了3000元";
    birthdayModel.birthdayDescriptionTitle = @"生日礼金,和一份特别惊喜!";
    [[ZRBirthdayHeartMgr shareInstance] showBirthdayViewInViewController:self birthdayModel:birthdayModel receiveBlock:^{
        NSLog(@"动画完成后做一些处理");
    }];
}

// 信封生日祝福
- (void)showEnvelopeBirthdayOneViewController {
    ZRBirthdayEnvelopeModel *model = [[ZRBirthdayEnvelopeModel alloc] init];
    model.birthdayLayerName = @"亲爱的戎马天涯";
    model.birthdayLayerDesc = @"我公司精心为您准备了3000元生日礼金,赶快来领取吧";
    model.birthdayLayerType = ZRBirthdayLayerTypeForA;
    [[ZRBirthdayEnvelopeMgr shareInstance] showBirthdayViewController:self birthdayModel:model];
}

// 信封送好友生日祝福
- (void)showEnvelopeBirthdayTwoViewController {
    ZRBirthdayEnvelopeModel *model = [[ZRBirthdayEnvelopeModel alloc] init];
    model.birthdayLayerName = @"亲爱的戎马天涯";
    model.birthdayLayerDesc = @"您的好友高圆圆小姐过生日啦,快去送祝福吧";
    model.birthdayLayerType = ZRBirthdayLayerTypeForB;
    for (NSInteger i = 0; i < 1; ++i) {
        ZRBirthdayEnvelopeFriendsItem *item = [ZRBirthdayEnvelopeFriendsItem new];
        item.title = @"高小姐";
        item.isMore = i > 2;
        [model.friendsBirthdayInfo addObject:item];
    }
    [[ZRBirthdayEnvelopeMgr shareInstance] showBirthdayViewController:self birthdayModel:model];
}

// 简单卡片翻转动画
- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"卡片翻转";
    // 可根据业务需求来自定义Model,在ZRCardDanceFrontView和ZRCardDanceReverseSideView中自定义UI
    ZRCardDanceView *cardDanceView = [[ZRCardDanceView alloc] initWithFrame:CGRectMake(0, 0, 172.5, 250) model:nil];
    cardDanceView.center = CGPointMake(ZRScreenW/2, ZRScreenH/2);
    [self.view addSubview:cardDanceView];
}

有任何感觉不妥的地方请您给出宝贵的意见,谢谢!

zranimation-master's People

Contributors

aidybao avatar

Stargazers

ningyevsaoteman avatar

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.