/
TiRootController.h
89 lines (75 loc) 路 2.65 KB
/
TiRootController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*/
#import <UIKit/UIKit.h>
#import "TiWindowProxy.h"
/**
The protocol for root controller.
It is not intended to be implemented by clients.
@see TiRootViewController
*/
@protocol TiRootController
@required
/**
Tells the root controller that a window became focused.
@param focusedViewController The focused view controller.
*/
-(void)windowFocused:(UIViewController*)focusedViewController;
/**
Tells the root controller that a window was closed.
@param closedViewController The closed view controller.
*/
-(void)windowClosed:(UIViewController *)closedViewController;
/**
Tells the root controller to resize its view to the size of main screen.
@return The bounds of the view after resize.
*/
-(CGRect)resizeView;
/**
Tells the root controller to reposition all its subviews.
*/
-(void)repositionSubviews;
/**
Tells the root controller that the view controller will hide.
@param viewController The view controller to hide.
@param animated The animation flag.
*/
- (void)willHideViewController:(UIViewController *)viewController animated:(BOOL)animated;
/**
Tells the root controller that the view controller was hidden.
@param viewController The view controller hidden.
@param animated The animation flag.
*/
- (void)didHideViewController:(UIViewController *)viewController animated:(BOOL)animated;
/**
Tells the root controller that the view controller will show.
@param viewController The view controller to show.
@param animated The animation flag.
*/
- (void)willShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
/**
Tells the root controller that the view controller was shown.
@param viewController The view controller shown.
@param animated The animation flag.
*/
- (void)didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
/**
Tells the root controller that the keyboard received a focus.
@param visibleProxy The view proxy that received keyboard focus.
*/
-(void)didKeyboardFocusOnProxy:(TiViewProxy<TiKeyboardFocusableView> *)visibleProxy;
/**
Tells the root controller that the keyboard was blurred.
@param blurredProxy The view proxy that blurred keyboard focus.
*/
-(void)didKeyboardBlurOnProxy:(TiViewProxy<TiKeyboardFocusableView> *)blurredProxy;
/**
Whether or not the window proxy is the top window.
@param window The window proxy
@return _YES_ if the window proxy is the top window, _NO_ otherwise.
*/
-(BOOL)isTopWindow:(TiWindowProxy*)window;
@end