Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: ios/chrome/browser/ui/animation_util.h

Issue 802633007: Upstream iOS UI utilities. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove rand() Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ios/chrome/DEPS ('k') | ios/chrome/browser/ui/animation_util.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef IOS_CHROME_BROWSER_UI_ANIMATION_UTIL_H_
6 #define IOS_CHROME_BROWSER_UI_ANIMATION_UTIL_H_
7
8 #import <UIKit/UIKit.h>
9
10 // Animations returned by these utility methods use kCAFillModeBoth and aren't
11 // automatically removed from the layer when finished. Remove the animations
12 // by calling |RemoveAnimationsFromLayers| in CATransaction completion blocks.
13 // This is done so the effects of animations that finish earlier persist until
14 // all animations in the transaction are finished.
15
16 // Returns an animation that will animate |layer| from |beginFrame| to
17 // |endFrame|.
18 CAAnimation* FrameAnimationMake(CALayer* layer,
19 CGRect beginFrame,
20 CGRect endFrame);
21
22 // Returns an animation that will animate the "opacity" property of a layer from
23 // |beginOpacity| to |endOpacity|.
24 CAAnimation* OpacityAnimationMake(CGFloat beginOpacity, CGFloat endOpacity);
25
26 // Returns an animation group containing the animations in |animations| that has
27 // the shortest duration necessary for all the animations to finish.
28 CAAnimation* AnimationGroupMake(NSArray* animations);
29
30 // Returns an animation that performs |animation| after |delay|.
31 CAAnimation* DelayedAnimationMake(CAAnimation* animation, CFTimeInterval delay);
32
33 // If |animation| is a CAAnimationGroup, searches its animations for a
34 // CABasicAnimation for |keyPath|. If |animation| is a CABasicAnimation, it
35 // will check its keyPath against |keyPath|.
36 CABasicAnimation* FindAnimationForKeyPath(NSString* keyPath,
37 CAAnimation* animation);
38
39 // Removes the animation for |key| from each CALayer in |layers|.
40 void RemoveAnimationForKeyFromLayers(NSString* key, NSArray* layers);
41
42 #endif // IOS_CHROME_BROWSER_UI_ANIMATION_UTIL_H_
OLDNEW
« no previous file with comments | « ios/chrome/DEPS ('k') | ios/chrome/browser/ui/animation_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698