fanyingzhao / LoginTransition

登陆按钮转场动画

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

LoginTransition

LoginTransitionAnimation

#登陆时的按钮动画转场.

GIF

###使用方式

// 初始化
self.translation = [[FYLoginTranslation alloc] initWithView:self.btn];

// 结束转场
[self.translation stopAnimation];

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
    self.translation.reverse = YES;
    return self.translation;
}

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
    self.translation.reverse = NO;
    return self.translation;
}

About

登陆按钮转场动画


Languages

Language:Objective-C 100.0%