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

Side by Side Diff: ios/clean/chrome/browser/ui/animators/zoom_transition_animator.h

Issue 2955033002: [ios clean] Moves animator and presenters under transitions (Closed)
Patch Set: Created 3 years, 5 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
OLDNEW
(Empty)
1 // Copyright 2016 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_CLEAN_CHROME_BROWSER_UI_ANIMATORS_ZOOM_TRANSITION_ANIMATOR_H_
6 #define IOS_CLEAN_CHROME_BROWSER_UI_ANIMATORS_ZOOM_TRANSITION_ANIMATOR_H_
7
8 #import <UIKit/UIKit.h>
9
10 #import "ios/clean/chrome/browser/ui/animators/zoom_transition_delegate.h"
11
12 // A transition animator object. The transition (for presentation) will begin
13 // with the presented view occupying a rectangle supplied by the delegate, or
14 // defaulting to a square in the center of the presenter's view. The
15 // presentation animation will change the size of the rectangle to match the
16 // final presented size. For dismissal, the same animation is done in reverse.
17 @interface ZoomTransitionAnimator
18 : NSObject<UIViewControllerAnimatedTransitioning>
19
20 // YES if the receiver is used for a presentation, NO (the default) if used
21 // for a dismissal. Calling code should set this before returning this object
22 // for UIKit to use.
23 @property(nonatomic, assign, getter=isPresenting) BOOL presenting;
24
25 // Optional object that can be passed into the delegate to identify a specific
26 // location. For example, an object in a table or collection view might have
27 // its index path passed in so the delegate can map that to a screen location.
28 @property(nonatomic, copy) NSObject* presentationKey;
29
30 // Delegate that can supply a source/destination rect for the animation.
31 @property(nonatomic, weak) id<ZoomTransitionDelegate> delegate;
32
33 // Convenience method to set a delegate from an array of objects that might
34 // implement the ZoomTransitionDelegate protocol. For example, either the
35 // source or presenting view controller (or neither) might implement the
36 // protocol. If |possibleDelegates| is empty, or if no object it contains
37 // conforms to ZoomTransitionDelegate, then the receiver's delegate will be
38 // nil. If multiple objects in |possibleDelegates| conforms to the protocol,
39 // then the first one will become the receiver's delegate.
40 - (void)selectDelegate:(NSArray<id<NSObject>>*)possibleDelegates;
41
42 @end
43
44 #endif // IOS_CLEAN_CHROME_BROWSER_UI_ANIMATORS_ZOOM_TRANSITION_ANIMATOR_H_
OLDNEW
« no previous file with comments | « ios/clean/chrome/browser/ui/animators/README.md ('k') | ios/clean/chrome/browser/ui/animators/zoom_transition_animator.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698