GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - peng827/WXSTransition: 界面转场动画集

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

143 Commits
143 Commits

Folders and files

NameName
Last commit message
Last commit date
WXSTransition.xcodeproj
WXSTransition.xcodeproj
 
 
WXSTransition
WXSTransition
 
 
WXSTransitionTests
WXSTransitionTests
 
 
WXSTransitionUITests
WXSTransitionUITests
 
 
gif
gif
 
 
.gitignore
.gitignore
 
 
.swift-version
.swift-version
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
WXSTransition.podspec
WXSTransition.podspec
 
 

Repository files navigation

WXSTransition

###介绍(Introduce) It is a transition animation asset。 We can add some transiton animations between view controllers in our iOS Apps . Now,it is easily to do this by this animation asset,even only one line of code. It includes about 50 kinds of animations. Now, it support 4 kinds of gesture for pop view controller. You can see the property in WXSTransitionProperty

这是一个界面转场动画集。 目前只支持纯代码。 在平时开发中,有时候需要一些转场动画给界面调整增添一些活力,而实现这些动画相对比较繁琐。为了让实现转场更简单,我写了这个界面转场动画集。跳转界面时,只要一行代码就可以实现这里面的动画。包括系统提供的动画在内,目前有大概50种动画。

现在已支持手势返回,有四个手势可以选择,可以在WXSTransitionProperty查看相关相关属性

###使用方法(Usage) #####1、首先导入头文件 #import "UINavigationController+WXSTransition.h"

#####2、一行代码就可以调用 Push:

 [self.navigationController wxs_pushViewController:(UIViewController *) animationType:(WXSTransitionAnimationType)];

Present:

[self wxs_presentViewController:(UIViewController *) animationType:(WXSTransitionAnimationType) completion:^{

}];

说明: WXSTransitionAnimationType是转场动画类型,通过这个枚举选择你想要的转场动画。

#####3、支持属性修改(Custom made property)

[self wxs_presentViewController:<#(UIViewController *)#> makeTransition:^(WXSTransitionManager *transition) {
transition.animationType =  WXSTransitionAnimationTypePointSpreadPresent;
transition.animationTime = 1;
}];

可以通过transition设置动画时间、、返回手势、动画类型等属性,可以在WXSTransitionProperty查看相关可修改属性。

像point Spread 、ViewMoveToNextVC这样的动画,需要个起始view,只要将目标控制器的startView指向这个view就可以了,代码如下; view_move_next.gif

[self.navigationController wxs_pushViewController:vc makeTransition:^(WXSTransitionProperty *transition) {
transition.animationType = WXSTransitionAnimationTypeViewMoveToNextVC;
transition.animationTime = 1;
transition.startView  = cell.imgView;
transition.targetView = vc.imageView;
}];

###动画效果图

#####自定义动画

boom:
boom.gif

brick:
brick_close_H.gif brick_open_V.gif

cover:
cover.gif

spread:
point_spread.gif spread_from_right.gif gestureSpread.gif

view move:
view_move_next.gif normalViewMove.gif

frgment:
frgmentFromRight.gif fragmentFromTop.gif

insideThenPush:
insideThenPush.gif

######系统动画 iOS自身其实有许多不错的转场动画,在这个转场动画集里也进行了封装,使用方法跟自定义转场动画一样。

Push:

[self.navigationController wxs_pushViewController:<#(UIViewController *)#> animationType:<#(WXSTransitionAnimationType)#>];

Present:

[self wxs_presentViewController:<#(UIViewController *)#> animationType:<#(WXSTransitionAnimationType)#> completion:<#^(void)completion#>]

sys_oglFlip.gif sys_pageCurl.gif

About

界面转场动画集

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.