CN107463367A - Transition cartoon implementing method and device - Google Patents
Transition cartoon implementing method and device Download PDFInfo
- Publication number
- CN107463367A CN107463367A CN201710479103.4A CN201710479103A CN107463367A CN 107463367 A CN107463367 A CN 107463367A CN 201710479103 A CN201710479103 A CN 201710479103A CN 107463367 A CN107463367 A CN 107463367A
- Authority
- CN
- China
- Prior art keywords
- animation
- page
- transition
- transition animation
- animated element
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 230000007704 transition Effects 0.000 title claims abstract description 413
- 238000000034 method Methods 0.000 title claims abstract description 171
- 230000015654 memory Effects 0.000 claims description 31
- 230000001960 triggered effect Effects 0.000 claims description 19
- 230000009471 action Effects 0.000 claims description 14
- 238000005516 engineering process Methods 0.000 claims description 10
- 230000008859 change Effects 0.000 claims description 6
- 230000000875 corresponding effect Effects 0.000 description 66
- 230000008569 process Effects 0.000 description 28
- 238000004590 computer program Methods 0.000 description 12
- 238000003860 storage Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 230000000694 effects Effects 0.000 description 8
- 230000003287 optical effect Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 238000005562 fading Methods 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000001151 other effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/38—Creation or generation of source code for implementing user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T13/00—Animation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Processing Or Creating Images (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
The embodiment of the present application provides a kind of transition cartoon implementing method and device.Transition cartoon implementing method includes:When receiving the instruction that second page is switched to from first page, view controller corresponding to second page is pressed into the stack top of UI navigation controllers;Judge whether view controller corresponding to second page has rewritten the transition animation configuration Object Creation method created in advance in parent view controller;If the determination result is YES, using the transition animation configuration attribute defined in the transition animation configuration Object Creation method after rewriting, create transition animation and perform object;Transition animation execution object is arranged to the agent object of UI navigation controllers;When it is determined that current page is first page, triggering agent object according to transition animation configuration attribute, generate from first page switch to second page during transition animation.The method provided using the embodiment of the present application can be decoupled transition animation in itself with business, reduce the time cost for realizing transition animation.
Description
Technical field
The application is related to Internet technical field, more particularly to a kind of transition cartoon implementing method and device.
Background technology
At present, almost all of intelligent terminal can all be related to the switching of user interface.It is and fast with software and hardware technology
Speed development, the transition effect of user interface are more and more rich and varied.For example, in iOS operating systems, there is provided several conventional
Transition animation effect, as being laterally pushed into, fading out, page turning and other effects.But these effects can not be completely covered in daily exploitation
Transition demand, it is therefore desirable to the ability of self-defined transition animation can be realized.
In model-view-controller (Model-View-Controller, MVC) framework, developer can pass through
The self-defined transition animation of agent functionality in the framework, make user interface in change with more abundant dynamic effect.But
It is that in this scheme for realizing self-defined transition animation, transition animation and business highly couple in itself, realizes that a transition is moved
The time cost of picture is higher.
The content of the invention
The many aspects of the application provide a kind of transition cartoon implementing method and device, can be by transition animation and business sheet
Body decouples, and reduces the time cost for realizing transition animation.
The embodiment of the present application provides a kind of transition cartoon implementing method, including:
When receiving the instruction that second page is switched to from first page, by view control corresponding to the second page
Device is pressed into the stack top of UI navigation controllers;
Judge whether view controller corresponding to the second page has rewritten to create in parent view controller in advance
Transition animation configuration Object Creation method;
If the determination result is YES, moved using the transition defined in the transition animation configuration Object Creation method after the rewriting
Configuration attribute is drawn, transition animation is created and performs object;
Transition animation execution object is arranged to the agent object of the UI navigation controllers;
When it is determined that current page is the first page, triggers the agent object and category is configured according to the transition animation
Property, generate from the first page switch to the second page during transition animation.
In an optional embodiment, the transition animation configuration attribute includes:The execution duration of whole field animation, whole field are moved
The animation attributes of each animated element in animated element set corresponding to picture and the animated element set;
The agent object is triggered according to the transition animation configuration attribute, generate switched to from the first page it is described
Transition animation during second page, including:
In the execution duration of the whole field animation, according to the animation attributes of each animated element, action is each dynamic successively
Draw element, with generate from the first page switch to the second page during transition animation.
In an optional embodiment, in the execution duration of the whole field animation, according to the animation of each animated element
Attribute, act each animated element successively, with generate from the first page switch to the second page during transition
Animation, including:
According to the execution duration of the whole field animation, a timer is created;
Whether according to the timing cycle of the timer, periodically detecting in the animated element set has animated element
Need to perform animation;
When having detected that animated element needs to perform animation, according to the animation for needing to perform the animated element of animation
Attribute, the action animated element for needing to perform animation;
After all animated elements in the animated element set are carried out animation, releasing memory.
In an optional embodiment, according to the animation attributes for needing to perform the animated element of animation, described in action
Before the animated element for needing execution animation, methods described also includes:
According to the screenshotss scope for needing to perform in the animation attributes of the element of animation, intercepted from the second page
Respective image, as the animated element for needing to perform animation.
In an optional embodiment, methods described also includes:
The transition animation configuration Object Creation method is added in the parent view controller in advance, and defines return
The method of the transition animation configuration Object Creation method;
The configuration class of transition animation, the transition animation are matched somebody with somebody defined in transition animation configuration Object Creation method
Putting class includes multiple animation items, and each animation item is used for the configuration attribute for defining a transition animation.
In an optional embodiment, it is determined that current page be the first page before, methods described also includes:
Using the affiliated partner in technology during operation, the transition animation is performed into object binding to the second page pair
The view controller answered.
In an optional embodiment, methods described also includes:
When receive switch to the instruction of the first page from the second page when, by corresponding to the second page
View controller ejects the stack top of the UI navigation controllers;
Obtain the transition animation that view controller corresponding to the second page is bound and perform object;
Transition animation execution object is arranged to the agent object of the UI navigation controllers;
When it is determined that current page is the second page, triggers the agent object and category is configured according to the transition animation
Property, generate from the second page switch to the first page during transition animation.
In an optional embodiment, transition animation execution object is being arranged to the generation of the UI navigation controllers
Before managing object, methods described also includes:
Change the transition animation configuration attribute;
The agent object is triggered according to the transition animation configuration attribute, generate switched to from the second page it is described
Transition animation during first page, including:
The agent object is triggered according to the amended transition animation configuration attribute, generates and is cut from the second page
The transition animation shifted to during the first page.
The embodiment of the present application also provides a kind of transition animation realization device, including:
Pop down module, for when receiving the instruction that second page is switched to from first page, by the second page
The stack top of corresponding view controller press-in UI navigation controllers;
Judge module, for judging whether view controller corresponding to the second page has been rewritten in advance in parent view
The transition animation configuration Object Creation method created in controller;
Creation module, for when the judged result of the judge module is is, utilizing the transition animation after the rewriting
The transition animation configuration attribute defined in Object Creation method is configured, transition animation is created and performs object;
Setup module, for transition animation execution object to be arranged to the agent object of the UI navigation controllers;
Generation module, for when it is determined that current page is the first page, triggering the agent object according to
Transition animation configuration attribute, generate from the first page switch to the second page during transition animation.
In an optional embodiment, the transition animation configuration attribute includes:The execution duration of whole field animation, whole field are moved
The animation attributes of each animated element in animated element set corresponding to picture and the animated element set;
The generation module is specifically used for:In the execution duration of the whole field animation, according to the dynamic of each animated element
Draw attribute, act each animated element successively, with generate from the first page switch to the second page during turn
Field animation.
In an optional embodiment, the generation module is specifically used for:According to the execution duration of the whole field animation, wound
Build a timer;Whether according to the timing cycle of the timer, periodically detect has in the animated element set
Drawing element needs to perform animation;When having detected that animated element needs to perform animation, need to perform the dynamic of animation according to described
Draw the animation attributes of element, the action animated element for needing to perform animation;When all dynamic in the animated element set
After picture element is carried out animation, releasing memory.
In an optional embodiment, the generation module is additionally operable to:Need to perform the dynamic of the element of animation according to described
The screenshotss scope in attribute is drawn, respective image is intercepted from the second page, as the animation member for needing to perform animation
Element.
In an optional embodiment, described device also includes:Add module, in advance in the parent view control
The transition animation configuration Object Creation method is added in device, and defines and returns to the transition animation configuration Object Creation method
Method;Wherein, the configuration class of the transition animation defined in transition animation configuration Object Creation method, the transition animation
Configuration class includes multiple animation items, and each animation item is used for the configuration attribute for defining a transition animation.
In an optional embodiment, described device also includes:Binding module, for using the association in technology when running
Object, the transition animation is performed into view controller corresponding to object binding to the second page.
In an optional embodiment, described device also includes:
Pop module, for when receive switch to the instruction of the first page from the second page when, will described in
View controller corresponding to second page ejects the stack top of the UI navigation controllers;
Acquisition module, the transition animation execution pair bound for obtaining view controller corresponding to the second page
As;
The setup module is additionally operable to:Transition animation execution object is arranged to the agency of the UI navigation controllers
Object;
The generation module is additionally operable to:When it is determined that current page is the second page, the agent object root is triggered
According to the transition animation configuration attribute, generate from the second page switch to the first page during transition animation.
In an optional embodiment, described device also includes:
Modified module, for transition animation execution object to be arranged into the UI Navigation Controls in the setup module
Before the agent object of device, the transition animation configuration attribute is changed;
The generation module is specifically used for:The agent object is triggered according to the amended transition animation configuration category
Property, generate from the second page switch to the first page during transition animation.
The embodiment of the present application also provides a kind of electronic equipment, including:One or more memories and one or more processing
Device;One or more of memories are used to store one or more computer instruction, wherein, one or more computer
Instruct the step that can be realized during one or more of computing devices in above-mentioned transition cartoon implementing method.
The embodiment of the present application also provides a kind of computer-readable recording medium for being stored with computer program, the computer
Program can realize the step in above-mentioned transition cartoon implementing method when being computer-executed.
In the embodiment of the present application, transition animation configuration Object Creation method is created in parent view controller in advance,
And allow subclass view controller to inherit and rewrite the transition animation configuration Object Creation method of parent, pass through turning after rewriting
Transition animation configuration attribute defined in the animation configuration Object Creation method of field, transition animation is created based on transition animation configuration attribute
Object is performed, and then combines the agent functionality of UI navigation controllers, by the way that transition animation execution object is arranged into UI navigation controls
The agent object of device processed, triggering agent object transition animation is realized according to transition animation configuration attribute, can by transition animation with
Business decouples in itself, improves the efficiency for realizing transition animation, reduces the time cost for realizing transition animation.
Brief description of the drawings
Accompanying drawing described herein is used for providing further understanding of the present application, forms the part of the application, this Shen
Schematic description and description please is used to explain the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the schematic diagram of the corresponding relation between two kinds of data structures that the embodiment of the application one provides;
Fig. 2 is the schematic diagram for the attribute list that the animatorItem that the embodiment of the application one provides defines transition animation;
Fig. 3 is the schematic flow sheet for the transition cartoon implementing method that the embodiment of the application one provides;
Fig. 4 is the schematic flow sheet for the transition cartoon implementing method that another embodiment of the application provides;
Fig. 5 is the structural representation for the transition animation realization device that the another embodiment of the application provides;
Fig. 6 is the structural representation for the transition animation realization device that the another embodiment of the application provides.
Embodiment
To make the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and
Technical scheme is clearly and completely described corresponding accompanying drawing.Obviously, described embodiment is only the application one
Section Example, rather than whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing
Go out under the premise of creative work the every other embodiment obtained, belong to the scope of the application protection.
In existing MVC frameworks, user interface (User Interface, UI) navigation controller
(UINavigationController) in addition to it can be used as UI stacks control view controller (ViewController) level,
Allow developer by the self-defined transition animation of its agent functionality, but in this scheme for realizing self-defined transition animation
In, transition animation and business highly couple in itself, realize that the time cost of a transition animation is higher.
Realize that self-defined transition is moved for the existing transition agent framework provided based on UINavigationController
The problems of during picture, the embodiment of the present application provides a solution, and cardinal principle is:In advance in parent view controller
Middle establishment transition animation configuration Object Creation method, and allow subclass view controller to inherit and rewrite the transition animation of parent and match somebody with somebody
Object Creation method is put, transition animation configuration attribute defined in Object Creation method is configured by the transition animation after rewriting,
Transition animation is created based on transition animation configuration attribute and performs object, and then combines the agent functionality of UI navigation controllers, is passed through
Transition animation execution object is arranged to the agent object of UI navigation controllers, triggering agent object configures according to transition animation to be belonged to
Property realizes transition animation.In the embodiment of the present application, it is allowed to which subclass view controller rewrites the transition animation configuration object of parent
Creation method defines transition animation configuration attribute, without realizing the transition animation of UI navigation controllers in view controller
(animatedTransitioning) agency agreement, transition animation can be decoupled in itself with business, improves and realize that transition is moved
The efficiency of picture, reduce the time cost for realizing transition animation.Wherein, the method for rewriteeing the method covering parent for referring to subclass,
It is required that method name and parameter are all identical.
, it is necessary to create transition animation configuration Object Creation in parent view controller in advance before transition animation is realized
Method, transition animation configuration attribute, transition animation configuration attribute can be defined in the transition animation configures Object Creation method
It is primarily referred to as the attribute related to realizing transition animation.For example, these attributes can include but is not limited to:Transition animation needs
The animated element wanted, the initial position of animated element, the end position of animated element, animated element initial angle (alpha),
Angle at the end, animation scaling, animation start time, animation duration, the animated element of animated element be before animation
It is no hide, animated element after animation whether hide etc..
It is alternatively possible to add transition animation configuration Object Creation method in parent view controller, and regarded in subclass
The realization of transition animation configuration Object Creation method is corresponded to defined in figure controller.For example, transition animation configures Object Creation side
Method can be realized as classification (category) method in parent view controller, at the same time in subclass view controller
The realization of the corresponding category methods of definition.
Still optionally further, in order that animated element abstracts, simplify transition animation realizes logic, implements in the application
Two kinds of data structures defined in example, it is respectively:Animation item (animatorItem) and animation configuration class
(animatorConfiguration).One animatorConfiguration includes multiple animatorItem, each
AnimatorItem can define one or more configuration attributes of a transition animation.Alternatively, animatorItem can be with
The configuration attribute of a transition animation is defined by configured list.
Further, in UI navigation controllers, administration view controller is carried out using stack, the view controller of stacking at first exists
Stack bottom, the view controller of last stacking is in stack top, and the page corresponding to the view controller in stack top is exactly UI Navigation Controls
The page that device is currently externally shown, that is, the page that user sees.And push and pop are the methods operated to stack,
In UI navigation controllers, a view controller can be pressed into stack top by push, and pop can eject the view controller of stack top;It is right
For user, a page can be opened by push and pop operations, or realize redirecting between the page.
With reference to above-mentioned push and pop methods, animatorItem can be divided into item (referred to as push- during push
Item the item (referred to as pop-item)) and during pop.Wherein, the relation between two kinds of data structures is as shown in Figure 1.Accordingly
Ground, each animatorItem defines the attribute list of a transition animation as shown in Fig. 2 but animatorItem definables
Animation attributes are not limited to the attribute shown in Fig. 2.
In the embodiment of the present application, adding the parent view controller of above-mentioned transition animation configuration Object Creation method allows
Subclass view controller is inherited and rewrites the configuration Object Creation method of the transition animation in parent.Based on this, for each needs
The subclass view controller of transition animation is realized, only need to configure object wound by rewriteeing the transition animation in parent view controller
Construction method, without writing the transition animated agents agreement of UI navigation controllers in subclass view controller, further tie
That closes the transition animation that the embodiment of the present application provides realizes logic, it is possible to achieve transition animation and the decoupling of business in itself, improves
The efficiency of transition animation is realized, reduces the time cost for realizing transition animation.
Object Creation method is configured based on the transition animation created in above-mentioned parent view controller, below with reference to attached
Figure, describe each embodiment of the application in detail and transition animation is realized based on the transition animation configuration Object Creation method for rewriteeing parent
Logic.
Fig. 3 is the schematic flow sheet for the transition cartoon implementing method that the embodiment of the application one provides.It is as shown in figure 3, described
Method includes:
301st, when receiving the instruction that second page is switched to from first page, by view control corresponding to second page
Device is pressed into the stack top of UI navigation controllers.
302nd, judge whether view controller corresponding to second page has rewritten to create in parent view controller in advance
Transition animation configuration Object Creation method;If the determination result is YES, step 303 is performed;If judged result is no, can enter existing
There is the implementation process of transition animation.
303rd, using the transition animation configuration attribute defined in the transition animation configuration Object Creation method after rewriting, create
Transition animation performs object.
The 304th, transition animation execution object is arranged to the agent object of UI navigation controllers.
305th, when it is determined that current page is first page, triggering agent object is according to transition animation configuration attribute, generation
From first page switch to second page during transition animation.
Any with the application scenarios of page layout switch demand, the transition animation that the present embodiment can be used to provide is realized
Method realizes transition animation during two page layout switch so that when the page changes with more abundant dynamic effect,
Improve user experience.
For example, when user needs to switch the page, the switching mode that can be supported by the page triggers page layout switch operation.
For example, if current page supports slide, user can trigger the switching between the page by slide.Example again
Such as, if current page is provided with switching push button, such as can be label corresponding to the different pages, then user can be cut by clicking on
The switching changed between the button triggering page.
For slave unit angle, the page layout switch operation of user's triggering can be caught, determines that user is needed from current page
Another page is switched to, and then page layout switch instruction can be generated, is realized and flowed according to the page layout switch instruction triggers transition animation
Journey.For ease of description, in this example, it is assumed that user needs to switch to second page from first page.First page and
Two pages can be the page in any application scenarios, such as can be with two pages or browser in any money APP
In two pages etc..Based on this, when receiving the instruction that second page is switched to from first page, it is real to start transition animation
Existing flow.
In the present embodiment, transition animation implementation process is as follows:
When receiving the instruction that second page is switched to from first page, by view controller pressure corresponding to second page
Enter the stack top of UI navigation controllers.Wherein it is possible to call the push methods in UI navigation controllers, will be regarded corresponding to second page
Figure controller is pressed into stack top.
Created in advance in parent view controller next, it is determined that whether view controller corresponding to second page has rewritten
Transition animation configuration Object Creation method.This point is different from the implementation process of existing transition animation, the reality of existing transition animation
Existing flow does not include the decision logic.Here view controller corresponding to second page is equivalent to the son for needing to realize transition animation
View controller.
In an optional embodiment, transition animation configuration Object Creation method is using two kinds of data structures shown in Fig. 1.
Based on this, it can be determined that whether there is animation configuration object to return after view controller is performed corresponding to second page, if the
After view controller corresponding to two pages is performed, there is animation configuration object to return, it is determined that view control corresponding to second page
System thinks highly of the transition animation configuration Object Creation method for having write parent;If view controller is performed corresponding to second page
Afterwards, returned without animation configuration object, it is determined that the transition animation that view controller corresponding to second page does not rewrite parent is matched somebody with somebody
Put Object Creation method.
If it is judged that view controller corresponding to second page does not rewrite the transition animation configuration Object Creation side of parent
Method, it means that need to realize transition animation according to the implementation process of existing transition animation, then can enter existing transition animation
Implementation process.The implementation process of existing transition animation refers to the transition animation provided based on UINavigationController
Agency agreement realizes the process of self-defined transition animation, specifically includes:Before the implementation process of existing transition animation is performed, in advance
The transition animated agents agreement of UI navigation controllers offer is first provided in view controller corresponding to second page, and realized
TransitionDuration methods, transitionDuration methods are configuring transition times;When the existing transition of entrance
After the implementation process of animation, when transition times reach, before obtaining view container, transition from first page and second page
The parameters such as the animated state after animated state, transition, call what is realized in advance in view controller corresponding to second page
AnimatedTransitioning realizes transition animation.Wherein, realized in view controller corresponding to second page
AnimatedTransitioning time cost is higher, and realizes the process and first page and second page of transition animation
Face is related, is tightly combined with business, and lead to not good concern transition animation itself realizes logic.
If it is judged that view controller corresponding to second page has rewritten the transition animation configuration Object Creation side of parent
Method, then the transition animation after rewriteeing, which is configured in Object Creation method, can define transition animation configuration attribute, transition animation configuration
Attribute be from first page switch to second page during required transition animation attribute.Based on this, can utilize after rewriteeing
Transition animation configuration Object Creation method defined in transition animation configuration attribute, create transition animation and perform object
(animator).Here it is that newly-built transition animation performs object to create transition animation and perform on the process nature of object, and is made
The process of newly-built transition animation execution object is initialized with transition animation configuration attribute.These transition animation configuration attributes can be made
The attribute of object is performed for transition animation, and transition animation can enter after performing Object Creation according to these transition animation configuration attributes
Row animation process.
Further, when realizing transition animation, it is necessary to rely on UI navigation controllers offer animated agents, will then be created
The transition animation built performs the agent object (delegate) that object is arranged to UI navigation controllers, in order to pass through agent object
Carry out animation process.Now, agent object will replace default transition animation to perform animation process.
Further, above-mentioned transition animation configuration attribute be from first page switch to second page when required transition animation
Attribute, then further determine that whether current page is first page.For example, the mark of current page can be obtained, will be current
The mark of the page is compared with the mark of first page;If both are identical, it may be determined that current page is first page;If two
Person is different, and it is not first page to illustrate current page.When it is determined that current page is first page, UI Navigation Controls are triggered
The agent object of device according to above-mentioned transition animation configuration attribute, generate from first page switch to second page during transition
Animation.
Alternatively, if current page is not first page, illustrate that centre has been likely to occur mistake, can select to terminate currently
Operation.Still optionally further, can be with output error prompt message.
In an optional embodiment, the transition animation that the transition animation configuration Object Creation method after rewriting defines configures
Attribute can include:In animated element set corresponding to the execution duration of whole field animation, whole field animation and animated element set
The animation attributes of each animated element.The animation attributes of each animated element can be but not limited to:In attribute list shown in Fig. 2
Attribute.
Based on above-mentioned transition animation configuration attribute, according to transition animation configuration attribute, generate from first page and switch to
The process of transition animation during two pages can include:In the execution duration of whole field animation, according to each animated element
Animation attributes, act each animated element successively, with generate from first page switch to second page during transition move
Draw.
Still optionally further, the process for generating transition animation can be divided into three phases, is respectively:Element pre-processes
Stage, element animation phase and end emptying phase.
Based on above-mentioned, a kind of process for generating transition animation includes:
Element pretreatment stage:According to the execution duration of whole field animation, a timer, the timing length of timer are created
Equal to the execution duration of whole field animation;On the one hand execution duration that timer can be directed to whole field animation carries out timing, on the other hand
Periodic timing can be carried out according to the fixed time interval of setting, the fixed time interval is much smaller than the execution duration of whole field animation, such as
Fixed time interval can be 0.005s;At the end of timer is for the timing of fixed time interval, animated element set will be detected
In whether have animated element need perform animation.Wherein, detect whether an animated element needs to perform animation mainly judgement
Whether timer is more than the Starting Executing Time of animated element for the timing time of the execution duration of whole field animation;If judge
Timer is more than or equal to the Starting Executing Time of animated element for the timing time of the execution duration of whole field animation, it is determined that
The animated element needs to perform animation;Conversely, determine that the animated element need not perform animation.
Element animation phase:When having detected that animated element needs to perform animation, need to perform animation according to described
The animation attributes of animated element, the action animated element for needing to perform animation.
Alternatively, if described need to have performed defined in the animation attributes of the animated element of animation animated element, directly
Act the animated element;If undefined animated element in the animation attributes for needing to perform the animated element of animation, but it is fixed
Justice screenshotss scopes, then can be according to the screenshotss scope for needing to perform in the animation attributes of the element of animation, from second page
Respective image is intercepted in face, as the animated element for needing to perform animation.
And then it can need to perform the first of the animated element defined in the animation attributes of the animated element of animation according to described
Beginning position, the duration of animated element, animation initial angle, the attribute such as angle at the end of animated element, control the needs
The animated element for performing animation carries out corresponding actions.When all animated elements in animated element set are all according to each self-corresponding
When animation attributes realize corresponding actions, it is meant that the realization of transition animation.
Terminate emptying phase:All animated elements in animated element set are all real according to each self-corresponding animation attributes
After existing corresponding actions, all animated elements in animated element set are emptied, with releasing memory.
As seen from the above analysis, in the present embodiment, it is necessary to which parent need to only be rewritten by realizing the view controller of transition animation
Transition animation configuration Object Creation method can obtain transition animation configuration attribute, only need to by transition animation perform object set
For the agent object of UI navigation controllers, controlled without realizing that UI navigates in the view controller for needing to realize transition animation
The animated agents of device processed, can be decoupling with business, improves the efficiency for realizing transition animation, reduces and realizes transition animation
Time cost.
In above-described embodiment or following embodiments, transition animation execution object is being arranged to the generation of UI navigation controllers
After managing object, affiliated partner when can also use OC (Objective-C) operation in (runtime) technology, by transition
Animation performs view controller corresponding to object binding to second page.Wherein, by affiliated partner by transition animation perform pair
As corresponding to being operationally tied to second page above view controller, transition animation is also just performed to the life cycle of object
The life cycle of view controller corresponding with second page is bound together, and so there is no need to be individually concerned about transition animation
The life cycle of object is performed, also can be along band release transition animation in view controller releasing memory corresponding to second page
Perform object, can avoid transition animation perform object always committed memory the problem of, improve memory usage.
In actual applications, after user switches to second page from first page, under many circumstances, be able to can go back
Need to switch back into first page from second page.For example, user switches to user's details page from certain shopping class APP homepage face
Coupon information is checked, return to the homepage again starts to do shopping afterwards.Also may be used during first page is switched back into from second page
To improve page layout switch effect by transition animation.In theory, switching to first page from second page is cut from first page
The inverse process of second page is shifted to, its transition animation can be with same or similar.Then, when switching to second page from first page
And then from second page switch to first page when, can be directly based upon from during first page switches to second page
Transition animation is created and has performed object implementatio8 transition animation, be advantageous to improve the efficiency for realizing transition animation, economize on resources.
Based on this, another embodiment of the application provides a kind of transition cartoon implementing method, as shown in figure 4, methods described includes:
401st, when receiving the instruction that first page is switched to from second page, by view control corresponding to second page
Device ejects the stack top of UI navigation controllers.
402nd, the transition animation for obtaining view controller binding corresponding to second page performs object, and the transition animation is held
Row object is to be created in the transition animation implementation process that second page is switched to from first page and be bound to second page
Corresponding to face in view controller.
The 403rd, transition animation execution object is arranged to the agent object of UI navigation controllers.
404th, when it is determined that current page is second page, triggering agent object is according to transition animation configuration attribute, generation
From second page switch to first page during transition animation;Wherein, the transition animation configuration attribute is from first
Into the transition animation implementation process of second page, the parent that the view controller as corresponding to second page is rewritten regards page layout switch
Defined in the transition animation configuration Object Creation method of figure controller.
In the present embodiment, when user needs to switch back into second page from second page, can be supported by the page
Switching mode triggering page layout switch operation.For example, if current page supports slide, user can pass through slide
Trigger the switching between the page.In another example if current page is provided with switching push button, such as can be marked corresponding to the different pages
Label, then user can be by clicking on the switching between the switching push button triggering page.
For slave unit angle, the page layout switch operation of user's triggering can be caught, determines that user is needed from second page
When switching to first page, page layout switch instruction can be generated.Based on this, first page is switched to when receiving from second page
Instruction when, start transition animation implementation process.
In the present embodiment, transition animation implementation process is as follows:
When receiving the instruction that first page is switched to from second page, view corresponding to second page can be identified
Controller is present in the stack top of UI navigation controllers, and Item when first page belongs to pop, then can be by second page
The stack top of corresponding view controller ejection UI navigation controllers.Wherein it is possible to the pop methods of UI navigation controllers are called, will
The stack top of view controller ejection UI navigation controllers corresponding to second page.
In addition, because have been realized in from first page switch to second page during transition animation, realize should
During transition animation, have been obtained for transition animation configuration attribute and transition animation performs object, and transition animation
Object is performed to be bound in view controller corresponding to second page.Based on this, second page pair can be directly obtained
Transition animation bound in the view controller answered performs object, performs object without re-creating transition animation, is advantageous to carry
Height realizes the efficiency of transition animation.
Further, when realizing transition animation, it is necessary to rely on UI navigation controllers offer animated agents, will then be obtained
The transition animation taken performs the agent object that object is arranged to UI navigation controllers, in order to be carried out by agent object at animation
Reason.
Further, since it is desired that returning to first page from second page, therefore, it is necessary to whether current page is further determined that
For second page.For example, the mark of current page can be obtained, the mark of the mark of current page and second page is compared
Compared with;If both are identical, it may be determined that current page is second page;If both are different, it is not second page to illustrate current page.
When it is determined that current page is second page, the agent object of triggering UI navigation controllers is matched somebody with somebody according to corresponding transition animation
Put attribute, generate from second page switch to first page during transition animation.
Alternatively, if current page is not second page, illustrate that centre has been likely to occur mistake, can select to terminate currently
Operation.Still optionally further, can be with output error prompt message.
Still optionally further, from second page switch to first page during transition animation, can with from first
Transition animation during page layout switch to second page is identical, can also differ.If switch to first page from second page
, then can be real directly using the transition animation configuration attribute during switching to second page from first page during face
Now with switch to second page from first page during transition animation identical transition animation.If in triggering UI Navigation Controls
The agent object of device according to transition animation configuration attribute, generate from second page switch to first page during transition animation
Before, transition animation configuration attribute is changed;Then, agent object is triggered according to amended transition animation configuration attribute, generation
From second page switch to first page during transition animation, then can realize and switch to second page mistake with first page
The transition animation that transition animation in journey differs.
For example, the starting position of two transition animations can be different, the anglec of rotation can different, transparency can be different
Deng further to enrich animation effect during page change.
As fully visible, the method provided using the embodiment of the present application, developer can be with self-defined complicated, colourful
Transition animation, and only need to create transition animation configuration Object Creation method in parent view controller in advance, for needing
The subclass view controller of transition animation is realized, only directly need to inherit and rewrite the transition animation configuration Object Creation method of parent
, without realizing the animated agents of UI navigation controllers offer in the subclass view controller for needing to realize transition animation,
Transition animation can be decoupled in itself with business, improves the efficiency for realizing transition animation, reduce realize transition animation when
Between cost.
It should be noted that the executive agent that above-described embodiment provides each step of method may each be same equipment,
Or this method is also by distinct device as executive agent.For example the executive agent of step 301 to step 305 can be equipment
A;Again for example, step 301 and 302 executive agent can be device A, and the executive agent of step 303 to 305 can be equipment B;
Etc..
Fig. 5 is the structural representation for the transition animation realization device that the another embodiment of the application provides.As shown in figure 5, institute
Stating device includes:Pop down module 51, judge module 52, creation module 53, setup module 54 and generation module 55.
Pop down module 51, for when receiving the instruction that second page is switched to from first page, by second page pair
The stack top for the view controller press-in UI navigation controllers answered.
Judge module 52, for judging as corresponding to pop down module 51 is pressed into the second page of stack top whether is view controller
The transition animation configuration Object Creation method created in advance in parent view controller is rewritten.
Creation module 53, for when the judged result of judge module 52 is is, being configured using the transition animation after rewriting
Transition animation configuration attribute defined in Object Creation method, create transition animation and perform object.
Setup module 54, the transition animation for creation module 53 to be created perform object and are arranged to UI navigation controllers
Agent object.
Generation module 55, for the agency couple that when it is determined that current page is first page, trigger setup module 54 is set
As according to transition animation configuration attribute, generate from first page switch to second page during transition animation.
In an optional embodiment, the transition animation configuration attribute includes:The execution duration of whole field animation, whole field are moved
The animation attributes of each animated element in animated element set corresponding to picture and the animated element set.Based on this, generate
Module 55 is specifically used for:In the execution duration of whole field animation, according to the animation attributes of each animated element, action is each successively
Animated element, with generate from first page switch to second page during transition animation.
Further, generation module 55 is specifically used for:According to the execution duration of whole field animation, a timer is created;According to
Whether the timing cycle of timer, periodically detecting has animated element to need to perform animation in animated element set;Work as detection
To when thering is animated element to need to perform animation, according to the animation attributes for needing to perform the animated element of animation, described in action
Need the animated element of execution animation;After all animated elements in animated element set are carried out animation, releasing memory.
Further, if described need to have performed defined in the animation attributes of the animated element of animation animated element, generate
Module 55 can be with the direct action animated element.It is if undefined dynamic in the animation attributes for needing to perform the animated element of animation
Element is drawn, but defines screenshotss scope, then generation module 55 is additionally operable to according to the animation for needing to perform the element of animation
Screenshotss scope in attribute, intercepts respective image from second page, as the animated element for needing to perform animation.
In an optional embodiment, as shown in fig. 6, described device also includes:Add module 61, in advance in parent
Transition animation configuration Object Creation method is added in view controller, and defines and returns to transition animation configuration Object Creation method
Method.Wherein, the configuration class of the transition animation defined in transition animation configuration Object Creation method, the configuration of the transition animation
Class includes multiple animation items, and each animation item is used for the configuration attribute for defining a transition animation.
In an optional embodiment, as shown in fig. 6, described device also includes:Binding module 62, in generation module
55 triggering agent objects according to transition animation configuration attribute generate from first page switch to second page during transition move
Before picture, using the affiliated partner in technology during operation, transition animation is performed into view corresponding to object binding to second page
Controller.So there is no need to individually be concerned about that transition animation performs the life cycle of object, in view corresponding to second page
Also object can be performed along band release transition animation during controller releasing memory, transition animation can be avoided to perform object and taken always
The problem of internal memory, improve memory usage.
In an optional embodiment, as shown in fig. 6, described device also includes:Module of popping 63 and acquisition module 64.
Module of popping 63, for when receiving the instruction that first page is switched to from second page, by second page pair
The stack top for the view controller ejection UI navigation controllers answered.Acquisition module 64, for obtaining view control corresponding to second page
The transition animation of device binding processed performs object.Correspondingly, setup module 54 is additionally operable to:Transition animation execution object is arranged to UI
The agent object of navigation controller.Generation module 55 is additionally operable to:When it is determined that current page is second page, agent object is triggered
According to transition animation configuration attribute, generate from second page switch to first page during transition animation.
Further, as shown in fig. 6, device also includes:Modified module 65.
Modified module 65, for transition animation execution object to be arranged to the agency of UI navigation controllers in setup module 54
Before object, transition animation configuration attribute is changed.Correspondingly, generation module 55 is specifically used for:Agent object is triggered according to modification
Transition animation configuration attribute afterwards, generate from second page switch to first page during transition animation.So can be
First page and second page realize different transition animations when mutually switching, further enrich animation effect during page change
Fruit.
The transition animation realization device that the present embodiment provides, available for the special show animation for performing the offer of above method embodiment
The flow of implementation method, its operation principle repeat no more.
The transition animation realization device provided using the present embodiment, developer can be with self-defined complicated, colourful
Transition animation, and only need to create transition animation configuration Object Creation method in parent view controller in advance, for needing
The subclass view controller of transition animation is realized, only directly need to inherit and rewrite the transition animation configuration Object Creation method of parent
, without realizing the animated agents of UI navigation controllers offer in the subclass view controller for needing to realize transition animation,
Transition animation can be decoupled in itself with business, improves the efficiency for realizing transition animation, reduce realize transition animation when
Between cost.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
These computer program instructions, which may be alternatively stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that the instruction being stored in the computer-readable memory, which produces, to be included referring to
Make the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one square frame of block diagram or
The function of being specified in multiple square frames.
These computer program instructions can be also loaded into computer or other programmable data processing devices so that counted
Series of operation steps is performed on calculation machine or other programmable devices to produce computer implemented processing, so as in computer or
The instruction performed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in individual square frame or multiple square frames.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net
Network interface and internal memory.
Internal memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or
The forms such as Nonvolatile memory, such as read-only storage (ROM) or flash memory (flash RAM).Internal memory is computer-readable medium
Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method
Or technology come realize information store.Information can be computer-readable instruction, data structure, the module of program or other data.
The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moved
State random access memory (DRAM), other kinds of random access memory (RAM), read-only storage (ROM), electric erasable
Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc read-only storage (CD-ROM),
Digital versatile disc (DVD) or other optical storages, magnetic cassette tape, the storage of tape magnetic rigid disk or other magnetic storage apparatus
Or any other non-transmission medium, the information that can be accessed by a computing device available for storage.Define, calculate according to herein
Machine computer-readable recording medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, commodity or equipment including a series of elements not only include those key elements, but also wrapping
Include the other element being not expressly set out, or also include for this process, method, commodity or equipment intrinsic want
Element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that wanted including described
Other identical element also be present in the process of element, method, commodity or equipment.
It will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program product.
Therefore, the application can be using the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Form.Deposited moreover, the application can use to can use in one or more computers for wherein including computer usable program code
The shape for the computer program product that storage media is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
Formula.
Embodiments herein is the foregoing is only, is not limited to the application.For those skilled in the art
For, the application can have various modifications and variations.All any modifications made within spirit herein and principle, it is equal
Replace, improve etc., it should be included within the scope of claims hereof.
The embodiment of the present application discloses A1, a kind of transition cartoon implementing method, including:
When receiving the instruction that second page is switched to from first page, by view control corresponding to the second page
Device is pressed into the stack top of UI navigation controllers;
Judge whether view controller corresponding to the second page has rewritten to create in parent view controller in advance
Transition animation configuration Object Creation method;
If the determination result is YES, moved using the transition defined in the transition animation configuration Object Creation method after the rewriting
Configuration attribute is drawn, transition animation is created and performs object;
Transition animation execution object is arranged to the agent object of the UI navigation controllers;
When it is determined that current page is the first page, triggers the agent object and category is configured according to the transition animation
Property, generate from the first page switch to the second page during transition animation.
In A2, the method as described in A1, the transition animation configuration attribute includes:The execution duration of whole field animation, whole field
The animation attributes of each animated element in animated element set corresponding to animation and the animated element set;
The agent object is triggered according to the transition animation configuration attribute, generate switched to from the first page it is described
Transition animation during second page, including:
In the execution duration of the whole field animation, according to the animation attributes of each animated element, action is each dynamic successively
Draw element, with generate from the first page switch to the second page during transition animation.
In A3, the method as described in A2, in the execution duration of the whole field animation, according to the animation of each animated element
Attribute, act each animated element successively, with generate from the first page switch to the second page during transition
Animation, including:
According to the execution duration of the whole field animation, a timer is created;
Whether according to the timing cycle of the timer, periodically detecting in the animated element set has animated element
Need to perform animation;
When having detected that animated element needs to perform animation, according to the animation for needing to perform the animated element of animation
Attribute, the action animated element for needing to perform animation;
After all animated elements in the animated element set are carried out animation, releasing memory.
In A4, the method as described in A3, according to the animation attributes for needing to perform the animated element of animation, described in action
Before the animated element for needing execution animation, methods described also includes:
According to the screenshotss scope for needing to perform in the animation attributes of the element of animation, intercepted from the second page
Respective image, as the animated element for needing to perform animation.
A5, the method as described in A1, in addition to:
The transition animation configuration Object Creation method is added in the parent view controller in advance, and defines return
The method of the transition animation configuration Object Creation method;
The configuration class of transition animation, the transition animation are matched somebody with somebody defined in transition animation configuration Object Creation method
Putting class includes multiple animation items, and each animation item is used for the configuration attribute for defining a transition animation.
In A6, the method as described in any one of A1-A5, it is determined that current page be the first page before, the side
Method also includes:
Using the affiliated partner in technology during operation, the transition animation is performed into object binding to the second page pair
The view controller answered.
A7, the method as described in A6, in addition to:
When receive switch to the instruction of the first page from the second page when, by corresponding to the second page
View controller ejects the stack top of the UI navigation controllers;
Obtain the transition animation that view controller corresponding to the second page is bound and perform object;
Transition animation execution object is arranged to the agent object of the UI navigation controllers;
When it is determined that current page is the second page, triggers the agent object and category is configured according to the transition animation
Property, generate from the second page switch to the first page during transition animation.
In A8, the method as described in A7, transition animation execution object is being arranged to the UI navigation controllers
Before agent object, methods described also includes:
Change the transition animation configuration attribute;
The agent object is triggered according to the transition animation configuration attribute, generate switched to from the second page it is described
Transition animation during first page, including:
The agent object is triggered according to the amended transition animation configuration attribute, generates and is cut from the second page
The transition animation shifted to during the first page.
The embodiment of the present application discloses B9, a kind of transition animation realization device, including:
Pop down module, for when receiving the instruction that second page is switched to from first page, by the second page
The stack top of corresponding view controller press-in UI navigation controllers;
Judge module, for judging whether view controller corresponding to the second page has been rewritten in advance in parent view
The transition animation configuration Object Creation method created in controller;
Creation module, for when the judged result of the judge module is is, utilizing the transition animation after the rewriting
The transition animation configuration attribute defined in Object Creation method is configured, transition animation is created and performs object;
Setup module, for transition animation execution object to be arranged to the agent object of the UI navigation controllers;
Generation module, for when it is determined that current page is the first page, triggering the agent object according to
Transition animation configuration attribute, generate from the first page switch to the second page during transition animation.
In B10, the device as described in B9, the transition animation configuration attribute includes:The execution duration of whole field animation, whole field
The animation attributes of each animated element in animated element set corresponding to animation and the animated element set;
The generation module is specifically used for:In the execution duration of the whole field animation, according to the dynamic of each animated element
Draw attribute, act each animated element successively, with generate from the first page switch to the second page during turn
Field animation.
In B11, the device as described in B10, the generation module is specifically used for:
According to the execution duration of the whole field animation, a timer is created;
Whether according to the timing cycle of the timer, periodically detecting in the animated element set has animated element
Need to perform animation;
When having detected that animated element needs to perform animation, according to the animation for needing to perform the animated element of animation
Attribute, the action animated element for needing to perform animation;
After all animated elements in the animated element set are carried out animation, releasing memory.
In B12, the device as described in B11, the generation module is additionally operable to:
According to the screenshotss scope for needing to perform in the animation attributes of the element of animation, intercepted from the second page
Respective image, as the animated element for needing to perform animation.
B13, the device as described in B9, in addition to:
Add module, for adding the transition animation configuration Object Creation side in the parent view controller in advance
Method, and define the method for returning to the transition animation configuration Object Creation method;
The configuration class of transition animation, the transition animation are matched somebody with somebody defined in transition animation configuration Object Creation method
Putting class includes multiple animation items, and each animation item is used for the configuration attribute for defining a transition animation.
B14, the device as described in any one of B9-B13, in addition to:
Binding module, for using the affiliated partner in technology when running, transition animation execution object binding to be arrived
View controller corresponding to the second page.
B15, the device as described in B14, in addition to:
Pop module, for when receive switch to the instruction of the first page from the second page when, will described in
View controller corresponding to second page ejects the stack top of the UI navigation controllers;
Acquisition module, the transition animation execution pair bound for obtaining view controller corresponding to the second page
As;
The setup module is additionally operable to:Transition animation execution object is arranged to the agency of the UI navigation controllers
Object;
The generation module is additionally operable to:When it is determined that current page is the second page, the agent object root is triggered
According to the transition animation configuration attribute, generate from the second page switch to the first page during transition animation.
B16, the device as described in B15, in addition to:
Modified module, for transition animation execution object to be arranged into the UI Navigation Controls in the setup module
Before the agent object of device, the transition animation configuration attribute is changed;
The generation module is specifically used for:The agent object is triggered according to the amended transition animation configuration category
Property, generate from the second page switch to the first page during transition animation.
C17, a kind of electronic equipment is also disclosed in the embodiment of the present application, including:One or more memories and one or more
Processor;One or more of memories are used to store one or more computer instruction, wherein, one or more meter
The step that the instruction of calculation machine can be realized during one or more of computing devices in any one of A1-A8 methods describeds.
D18, a kind of computer-readable recording medium for being stored with computer program, the meter is also disclosed in the embodiment of the present application
Calculation machine program can realize the step in any one of A1-A8 methods describeds when being computer-executed.
Claims (10)
- A kind of 1. transition cartoon implementing method, it is characterised in that including:When receiving the instruction that second page is switched to from first page, by view controller pressure corresponding to the second page Enter the stack top of UI navigation controllers;Judge whether view controller corresponding to the second page has rewritten turn created in advance in parent view controller Field animation configuration Object Creation method;If the determination result is YES, matched somebody with somebody using the transition animation defined in the transition animation configuration Object Creation method after the rewriting Attribute is put, transition animation is created and performs object;Transition animation execution object is arranged to the agent object of the UI navigation controllers;When it is determined that current page is the first page, the agent object is triggered according to the transition animation configuration attribute, Generate from the first page switch to the second page during transition animation.
- 2. according to the method for claim 1, it is characterised in that the transition animation configuration attribute includes:Whole field animation The animation category of each animated element in animated element set corresponding to execution duration, whole field animation and the animated element set Property;The agent object is triggered according to the transition animation configuration attribute, generates from the first page and switches to described second Transition animation during the page, including:In the execution duration of the whole field animation, according to the animation attributes of each animated element, each animation member is acted successively Element, with generate from the first page switch to the second page during transition animation.
- 3. according to the method for claim 2, it is characterised in that in the execution duration of the whole field animation, according to each The animation attributes of animated element, each animated element is acted successively, the second page is switched to from the first page with generation Transition animation during face, including:According to the execution duration of the whole field animation, a timer is created;Whether according to the timing cycle of the timer, periodically detecting in the animated element set has animated element needs Perform animation;When having detected that animated element needs to perform animation, according to the animation category for needing to perform the animated element of animation Property, the action animated element for needing to perform animation;After all animated elements in the animated element set are carried out animation, releasing memory.
- 4. according to the method for claim 3, it is characterised in that according to the animation for needing to perform the animated element of animation Attribute, action it is described need perform animation animated element before, methods described also includes:According to the screenshotss scope for needing to perform in the animation attributes of the element of animation, intercepted from the second page corresponding Image, as the animated element for needing to perform animation.
- 5. according to the method for claim 1, it is characterised in that also include:The transition animation configuration Object Creation method is added in the parent view controller in advance, and is defined described in return The method that transition animation configures Object Creation method;The configuration class of transition animation, the configuration class of the transition animation defined in transition animation configuration Object Creation method Including multiple animation items, each animation item is used for the configuration attribute for defining a transition animation.
- 6. according to the method described in claim any one of 1-5, it is characterised in that it is determined that current page is the first page Before, methods described also includes:Using the affiliated partner in technology during operation, the transition animation is performed corresponding to object binding to the second page View controller.
- 7. according to the method for claim 6, it is characterised in that also include:When receive switch to the instruction of the first page from the second page when, by view corresponding to the second page Controller ejects the stack top of the UI navigation controllers;Obtain the transition animation that view controller corresponding to the second page is bound and perform object;Transition animation execution object is arranged to the agent object of the UI navigation controllers;When it is determined that current page is the second page, the agent object is triggered according to the transition animation configuration attribute, Generate from the second page switch to the first page during transition animation.
- 8. according to the method for claim 7, it is characterised in that transition animation execution object is being arranged to the UI Before the agent object of navigation controller, methods described also includes:Change the transition animation configuration attribute;The agent object is triggered according to the transition animation configuration attribute, generates from the second page and switches to described first Transition animation during the page, including:The agent object is triggered according to the amended transition animation configuration attribute, generates and is switched to from the second page Transition animation during the first page.
- A kind of 9. transition animation realization device, it is characterised in that including:Pop down module, for when receiving the instruction that second page is switched to from first page, the second page to be corresponded to View controller press-in UI navigation controllers stack top;Judge module, for judging whether view controller corresponding to the second page has been rewritten in advance in parent view control The transition animation configuration Object Creation method created in device;Creation module, for when the judged result of the judge module is is, being configured using the transition animation after the rewriting Transition animation configuration attribute defined in Object Creation method, create transition animation and perform object;Setup module, for transition animation execution object to be arranged to the agent object of the UI navigation controllers;Generation module, for when it is determined that current page is the first page, triggering the agent object according to the transition Animation configuration attribute, generate from the first page switch to the second page during transition animation.
- 10. device according to claim 9, it is characterised in that the transition animation configuration attribute includes:Whole field animation The animation category of each animated element in animated element set corresponding to execution duration, whole field animation and the animated element set Property;The generation module is specifically used for:In the execution duration of the whole field animation, according to the animation category of each animated element Property, act each animated element successively, with generate from the first page switch to the second page during transition move Draw.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710479103.4A CN107463367B (en) | 2017-06-22 | 2017-06-22 | Transition animation realization method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710479103.4A CN107463367B (en) | 2017-06-22 | 2017-06-22 | Transition animation realization method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107463367A true CN107463367A (en) | 2017-12-12 |
CN107463367B CN107463367B (en) | 2021-05-18 |
Family
ID=60546520
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710479103.4A Expired - Fee Related CN107463367B (en) | 2017-06-22 | 2017-06-22 | Transition animation realization method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107463367B (en) |
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108074273A (en) * | 2018-01-31 | 2018-05-25 | 成都睿码科技有限责任公司 | A kind of animation interactive mode for promoting user experience |
CN108491230A (en) * | 2018-01-24 | 2018-09-04 | 阿里巴巴集团控股有限公司 | Cartoon display method and device, client |
CN108920247A (en) * | 2018-07-20 | 2018-11-30 | 腾讯科技(深圳)有限公司 | Processing method, device and the terminal of page switching, storage medium, program product |
CN108984245A (en) * | 2018-06-20 | 2018-12-11 | 武汉斑马快跑科技有限公司 | A kind of page switching method and system based on single view controller |
CN109086105A (en) * | 2018-08-14 | 2018-12-25 | 北京奇艺世纪科技有限公司 | A kind of page layout conversion method, device and electronic equipment |
CN109739591A (en) * | 2018-11-09 | 2019-05-10 | 深圳壹账通智能科技有限公司 | A kind of transition animation formulating method, device and equipment |
CN110148214A (en) * | 2019-05-21 | 2019-08-20 | 北京光启元数字科技有限公司 | A kind of data visualization method and device of more scenes |
CN110162343A (en) * | 2019-04-10 | 2019-08-23 | 北京梧桐车联科技有限责任公司 | Using starting method and device, electronic equipment and storage medium |
CN110209452A (en) * | 2019-05-29 | 2019-09-06 | 维沃移动通信有限公司 | The page display method and mobile terminal of mobile terminal |
CN110276031A (en) * | 2019-06-24 | 2019-09-24 | 北京向上一心科技有限公司 | Animated show method, system, equipment and the computer readable storage medium of page assembly |
CN110941464A (en) * | 2018-09-21 | 2020-03-31 | 阿里巴巴集团控股有限公司 | Light exposure method, device, system and storage medium |
CN110968373A (en) * | 2018-09-29 | 2020-04-07 | 北京国双科技有限公司 | Page switching implementation method and device, storage medium and processor |
CN111127601A (en) * | 2019-12-25 | 2020-05-08 | 北京金山猎豹科技有限公司 | Animation switching method and device, electronic equipment and storage medium |
CN111324400A (en) * | 2018-12-17 | 2020-06-23 | 中兴通讯股份有限公司 | Display method, device, terminal and storage medium |
CN111443977A (en) * | 2020-04-14 | 2020-07-24 | 重庆赋比兴科技有限公司 | Self-defined transition method based on iOS |
CN111459581A (en) * | 2019-01-22 | 2020-07-28 | 阿里巴巴集团控股有限公司 | Page switching method and device, electronic equipment and computer readable medium |
CN111694624A (en) * | 2019-03-13 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Rollback display processing method, apparatus, device and medium |
CN111901370A (en) * | 2020-05-29 | 2020-11-06 | 大数金科网络技术有限公司 | Method for customizing iOS navigation bar style based on protocol |
CN112286410A (en) * | 2020-09-25 | 2021-01-29 | 长沙市到家悠享网络科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
CN112989249A (en) * | 2021-02-19 | 2021-06-18 | 北京皮尔布莱尼软件有限公司 | Page display method, computing device and storage medium |
CN114416234A (en) * | 2021-12-28 | 2022-04-29 | 网易(杭州)网络有限公司 | Page switching method and device, computer equipment and storage medium |
CN116974678A (en) * | 2023-07-28 | 2023-10-31 | 重庆赛力斯新能源汽车设计院有限公司 | Page-based view controller jump method, device and storage medium |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007072113A1 (en) * | 2005-12-21 | 2007-06-28 | Interagens S.R.L. | Method for controlling animations in real time |
WO2007087444A2 (en) * | 2006-01-25 | 2007-08-02 | Pixar | Methods and apparatus for accelerated animation using point multiplication and soft caching |
US20080001951A1 (en) * | 2006-05-07 | 2008-01-03 | Sony Computer Entertainment Inc. | System and method for providing affective characteristics to computer generated avatar during gameplay |
CN101236558A (en) * | 2008-02-29 | 2008-08-06 | 腾讯科技(深圳)有限公司 | Method and device for simulating IM client end interface based on web page |
CN102402381A (en) * | 2010-08-23 | 2012-04-04 | Lg电子株式会社 | Mobile terminal and method for controlling mobile terminal |
US20120084750A1 (en) * | 2010-09-30 | 2012-04-05 | Oracle International Corporation | Method for Efficiently Managing Property Types and Constraints In a Prototype Based Dynamic Programming Language |
CN102736912A (en) * | 2010-12-13 | 2012-10-17 | 微软公司 | Coordination of animations across multiple applications or processes |
EP2538325A1 (en) * | 2007-01-07 | 2012-12-26 | Apple Inc. | Animations |
US20140098106A1 (en) * | 2007-01-07 | 2014-04-10 | Apple Inc. | Application programming interfaces for synchronization |
CN104216773A (en) * | 2013-06-05 | 2014-12-17 | 腾讯科技(深圳)有限公司 | View switching method and device |
CN104423785A (en) * | 2013-09-05 | 2015-03-18 | 腾讯科技(深圳)有限公司 | View switching method and terminal |
CN104463932A (en) * | 2013-09-22 | 2015-03-25 | 北大方正集团有限公司 | Animation effect achieving method and device |
CN104933142A (en) * | 2015-06-18 | 2015-09-23 | 北京奇虎科技有限公司 | Animation display method and device |
CN105893095A (en) * | 2016-04-13 | 2016-08-24 | 海尔优家智能科技(北京)有限公司 | Webpage loading method and device |
CN106156066A (en) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | A kind of page switching method, device and client |
CN106843953A (en) * | 2017-01-16 | 2017-06-13 | 百融(北京)金融信息服务股份有限公司 | Application program transverse direction switching system and method based on iOS system |
-
2017
- 2017-06-22 CN CN201710479103.4A patent/CN107463367B/en not_active Expired - Fee Related
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2007072113A1 (en) * | 2005-12-21 | 2007-06-28 | Interagens S.R.L. | Method for controlling animations in real time |
WO2007087444A2 (en) * | 2006-01-25 | 2007-08-02 | Pixar | Methods and apparatus for accelerated animation using point multiplication and soft caching |
US20080001951A1 (en) * | 2006-05-07 | 2008-01-03 | Sony Computer Entertainment Inc. | System and method for providing affective characteristics to computer generated avatar during gameplay |
EP2538325A1 (en) * | 2007-01-07 | 2012-12-26 | Apple Inc. | Animations |
US20140098106A1 (en) * | 2007-01-07 | 2014-04-10 | Apple Inc. | Application programming interfaces for synchronization |
CN101236558A (en) * | 2008-02-29 | 2008-08-06 | 腾讯科技(深圳)有限公司 | Method and device for simulating IM client end interface based on web page |
CN102402381A (en) * | 2010-08-23 | 2012-04-04 | Lg电子株式会社 | Mobile terminal and method for controlling mobile terminal |
US20120084750A1 (en) * | 2010-09-30 | 2012-04-05 | Oracle International Corporation | Method for Efficiently Managing Property Types and Constraints In a Prototype Based Dynamic Programming Language |
CN102736912A (en) * | 2010-12-13 | 2012-10-17 | 微软公司 | Coordination of animations across multiple applications or processes |
CN104216773A (en) * | 2013-06-05 | 2014-12-17 | 腾讯科技(深圳)有限公司 | View switching method and device |
CN104423785A (en) * | 2013-09-05 | 2015-03-18 | 腾讯科技(深圳)有限公司 | View switching method and terminal |
CN104463932A (en) * | 2013-09-22 | 2015-03-25 | 北大方正集团有限公司 | Animation effect achieving method and device |
CN106156066A (en) * | 2015-03-30 | 2016-11-23 | 阿里巴巴集团控股有限公司 | A kind of page switching method, device and client |
CN104933142A (en) * | 2015-06-18 | 2015-09-23 | 北京奇虎科技有限公司 | Animation display method and device |
CN105893095A (en) * | 2016-04-13 | 2016-08-24 | 海尔优家智能科技(北京)有限公司 | Webpage loading method and device |
CN106843953A (en) * | 2017-01-16 | 2017-06-13 | 百融(北京)金融信息服务股份有限公司 | Application program transverse direction switching system and method based on iOS system |
Non-Patent Citations (2)
Title |
---|
BOHRISLAY: "导航控制器的自定义转场动画-iOS", 《HTTPS://WWW.JIANSHU.COM/P/93BAD7CAB469》 * |
HOOCAN: "初学iOS_UI界面源代码_精细整理笔记内容_视图控制器和导航视图控制器", 《HTTP://BLOG.SINA.COM.CN/S/BLOG_12FF4F7900102VFOC.HTML》 * |
Cited By (32)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108491230A (en) * | 2018-01-24 | 2018-09-04 | 阿里巴巴集团控股有限公司 | Cartoon display method and device, client |
CN108074273A (en) * | 2018-01-31 | 2018-05-25 | 成都睿码科技有限责任公司 | A kind of animation interactive mode for promoting user experience |
CN108984245B (en) * | 2018-06-20 | 2021-08-31 | 武汉斑马快跑科技有限公司 | Page switching method and system based on single-view controller |
CN108984245A (en) * | 2018-06-20 | 2018-12-11 | 武汉斑马快跑科技有限公司 | A kind of page switching method and system based on single view controller |
CN108920247B (en) * | 2018-07-20 | 2022-04-29 | 腾讯科技(深圳)有限公司 | Page switching processing method, device and terminal, storage medium and program product |
CN108920247A (en) * | 2018-07-20 | 2018-11-30 | 腾讯科技(深圳)有限公司 | Processing method, device and the terminal of page switching, storage medium, program product |
CN109086105B (en) * | 2018-08-14 | 2022-12-06 | 北京奇艺世纪科技有限公司 | Page layout conversion method and device and electronic equipment |
CN109086105A (en) * | 2018-08-14 | 2018-12-25 | 北京奇艺世纪科技有限公司 | A kind of page layout conversion method, device and electronic equipment |
CN110941464B (en) * | 2018-09-21 | 2024-04-16 | 阿里巴巴集团控股有限公司 | Light exposure method, device, system and storage medium |
CN110941464A (en) * | 2018-09-21 | 2020-03-31 | 阿里巴巴集团控股有限公司 | Light exposure method, device, system and storage medium |
CN110968373A (en) * | 2018-09-29 | 2020-04-07 | 北京国双科技有限公司 | Page switching implementation method and device, storage medium and processor |
CN109739591A (en) * | 2018-11-09 | 2019-05-10 | 深圳壹账通智能科技有限公司 | A kind of transition animation formulating method, device and equipment |
CN111324400A (en) * | 2018-12-17 | 2020-06-23 | 中兴通讯股份有限公司 | Display method, device, terminal and storage medium |
CN111459581B (en) * | 2019-01-22 | 2024-04-16 | 阿里巴巴集团控股有限公司 | Page switching method, device, electronic equipment and computer readable medium |
CN111459581A (en) * | 2019-01-22 | 2020-07-28 | 阿里巴巴集团控股有限公司 | Page switching method and device, electronic equipment and computer readable medium |
CN111694624A (en) * | 2019-03-13 | 2020-09-22 | 北京字节跳动网络技术有限公司 | Rollback display processing method, apparatus, device and medium |
CN110162343A (en) * | 2019-04-10 | 2019-08-23 | 北京梧桐车联科技有限责任公司 | Using starting method and device, electronic equipment and storage medium |
CN110162343B (en) * | 2019-04-10 | 2023-04-07 | 北京梧桐车联科技有限责任公司 | Application starting method and device, electronic equipment and storage medium |
CN110148214A (en) * | 2019-05-21 | 2019-08-20 | 北京光启元数字科技有限公司 | A kind of data visualization method and device of more scenes |
CN110148214B (en) * | 2019-05-21 | 2022-12-13 | 腾讯云计算(北京)有限责任公司 | Multi-scene data visualization method and device |
CN110209452B (en) * | 2019-05-29 | 2022-10-14 | 维沃移动通信有限公司 | Page display method of mobile terminal and mobile terminal |
CN110209452A (en) * | 2019-05-29 | 2019-09-06 | 维沃移动通信有限公司 | The page display method and mobile terminal of mobile terminal |
CN110276031A (en) * | 2019-06-24 | 2019-09-24 | 北京向上一心科技有限公司 | Animated show method, system, equipment and the computer readable storage medium of page assembly |
CN111127601A (en) * | 2019-12-25 | 2020-05-08 | 北京金山猎豹科技有限公司 | Animation switching method and device, electronic equipment and storage medium |
CN111443977A (en) * | 2020-04-14 | 2020-07-24 | 重庆赋比兴科技有限公司 | Self-defined transition method based on iOS |
CN111901370A (en) * | 2020-05-29 | 2020-11-06 | 大数金科网络技术有限公司 | Method for customizing iOS navigation bar style based on protocol |
CN112286410A (en) * | 2020-09-25 | 2021-01-29 | 长沙市到家悠享网络科技有限公司 | Data processing method and device, electronic equipment and computer readable medium |
CN112989249A (en) * | 2021-02-19 | 2021-06-18 | 北京皮尔布莱尼软件有限公司 | Page display method, computing device and storage medium |
CN114416234A (en) * | 2021-12-28 | 2022-04-29 | 网易(杭州)网络有限公司 | Page switching method and device, computer equipment and storage medium |
CN114416234B (en) * | 2021-12-28 | 2023-09-12 | 网易(杭州)网络有限公司 | Page switching method and device, computer equipment and storage medium |
CN116974678A (en) * | 2023-07-28 | 2023-10-31 | 重庆赛力斯新能源汽车设计院有限公司 | Page-based view controller jump method, device and storage medium |
CN116974678B (en) * | 2023-07-28 | 2024-08-09 | 重庆赛力斯凤凰智创科技有限公司 | Page-based view controller jump method, device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107463367B (en) | 2021-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107463367A (en) | Transition cartoon implementing method and device | |
Wu | React Native vs Flutter, Cross-platforms mobile application frameworks | |
Wingate et al. | Lightweight implementations of probabilistic programming languages via transformational compilation | |
CN105739983B (en) | Shell script editing device and its implementation | |
US20120110444A1 (en) | Help Document Animated Visualization | |
CN107704576A (en) | data display optimization method, device, terminal device and storage medium | |
CN109885795A (en) | A kind of end Web animation configuration method and device | |
CN106250156B (en) | Constructing method of component and device, component call method and apparatus | |
US20140223408A1 (en) | Integration project center | |
Francese et al. | Supporting the development of multi-platform mobile applications | |
CN106648666A (en) | User interface generating method and user interface generating system | |
Valmari et al. | Stubborn set intuition explained | |
Gentzel et al. | Haddock: A language and architecture for decision diagram compilation | |
CN102289835A (en) | Micro-animation effect checking method and device | |
CN105573595A (en) | Information display method and device | |
CN108170430A (en) | A kind of method and system of showing interface | |
CN110045956A (en) | Configuration method, device, equipment and the readable storage medium storing program for executing of component | |
Houhou et al. | A first-order logic semantics for communication-parametric BPMN collaborations | |
Ujma | On verification and controller synthesis for probabilistic systems at runtime | |
Tong et al. | Comparative Performance Analysis of Javascript Frontend Web Frameworks | |
CN109240678A (en) | code generating method and device | |
CN110020070A (en) | Webpage circle selects data processing method, apparatus and system | |
CN104321722A (en) | System and method for modifying content display size | |
Itzhaky et al. | Deductive synthesis of programs with pointers: techniques, challenges, opportunities | |
Wingrave et al. | A natural, tiered and executable UIDL for 3D user interfaces based on Concept-Oriented Design |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
CB02 | Change of applicant information |
Address after: 100096 building N3, Jinyu Zhizao workshop, 27 Jiancai Chengzhong Road, Haidian District, Beijing Applicant after: Beijing Xingxuan Technology Co.,Ltd. Address before: Room 202, 2 floors, 1-3 floors, No. 11 Shangdi Information Road, Haidian District, Beijing 100085 Applicant before: Beijing Xiaodu Information Technology Co.,Ltd. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20210518 |
|
CF01 | Termination of patent right due to non-payment of annual fee |