├── intro.gif
├── README.md
├── BHPullUpTransition
├── BHPullUpTransition
│ ├── resources
│ │ ├── 1.png
│ │ └── 2.png
│ ├── BHTransitionFromFirstToSecond.h
│ ├── SecondViewController.h
│ ├── FirstViewController.h
│ ├── AppDelegate.h
│ ├── main.m
│ ├── Images.xcassets
│ │ ├── LaunchImage.launchimage
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── SecondViewController.m
│ ├── Info.plist
│ ├── BHTransitionFromFirstToSecond.m
│ ├── AppDelegate.m
│ └── FirstViewController.m
├── BHPullUpTransition.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── BHPullUpTransitionTests
│ ├── Info.plist
│ └── BHPullUpTransitionTests.m
├── .gitignore
└── LICENSE
/intro.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qylibohao/BHPullUpTransition/HEAD/intro.gif
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # BHPullUpTransition
2 | 一个向上滑动的转场动画,上划过程可以取消动画。
3 |
4 | 
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/resources/1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qylibohao/BHPullUpTransition/HEAD/BHPullUpTransition/BHPullUpTransition/resources/1.png
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/resources/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/qylibohao/BHPullUpTransition/HEAD/BHPullUpTransition/BHPullUpTransition/resources/2.png
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/BHTransitionFromFirstToSecond.h:
--------------------------------------------------------------------------------
1 | //
2 | // CMTransitionFromFirstToSecond
3 | // Chimian
4 | //
5 | // Created by libohao on 15/5/9.
6 | //
7 | //
8 | #import
9 |
10 | @interface BHTransitionFromFirstToSecond : NSObject
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/SecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.h
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/FirstViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FirstViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/Images.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "portrait",
5 | "idiom" : "iphone",
6 | "minimum-system-version" : "7.0",
7 | "scale" : "2x"
8 | },
9 | {
10 | "orientation" : "portrait",
11 | "idiom" : "iphone",
12 | "minimum-system-version" : "7.0",
13 | "subtype" : "retina4",
14 | "scale" : "2x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransitionTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.libohao.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/SecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.m
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import "SecondViewController.h"
10 |
11 | @interface SecondViewController ()
12 |
13 | @property (nonatomic, strong) UIImageView* backGroundImageView;
14 |
15 | @end
16 |
17 | @implementation SecondViewController
18 |
19 | - (UIImageView* )backGroundImageView {
20 | if (!_backGroundImageView) {
21 | _backGroundImageView = [[UIImageView alloc]initWithFrame:self.view.bounds];
22 | _backGroundImageView.image = [UIImage imageNamed:@"1"];
23 | _backGroundImageView.clipsToBounds = YES;
24 | }
25 | return _backGroundImageView;
26 | }
27 |
28 |
29 | - (void)viewDidLoad {
30 | [super viewDidLoad];
31 | [self.view addSubview:self.backGroundImageView];
32 |
33 | }
34 |
35 | - (void)didReceiveMemoryWarning {
36 | [super didReceiveMemoryWarning];
37 | }
38 |
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransitionTests/BHPullUpTransitionTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // BHPullUpTransitionTests.m
3 | // BHPullUpTransitionTests
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface BHPullUpTransitionTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation BHPullUpTransitionTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 豪
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.libohao.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/BHTransitionFromFirstToSecond.m:
--------------------------------------------------------------------------------
1 | //
2 | // CMTransitionFromFirstToSecond
3 | // Chimian
4 | //
5 | // Created by libohao on 15/5/9.
6 | //
7 | //
8 |
9 | #import "BHTransitionFromFirstToSecond.h"
10 |
11 | #import "FirstViewController.h"
12 | #import "SecondViewController.h"
13 |
14 |
15 | @implementation BHTransitionFromFirstToSecond
16 |
17 | - (void)animateTransition:(id)transitionContext {
18 | FirstViewController *fromViewController = (FirstViewController*)[transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
19 | SecondViewController *toViewController = (SecondViewController*)[transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
20 | UIView *containerView = [transitionContext containerView];
21 | NSTimeInterval duration = [self transitionDuration:transitionContext];
22 |
23 | UIView *imageSnapshot = [[UIApplication sharedApplication].keyWindow snapshotViewAfterScreenUpdates:NO];
24 | imageSnapshot.frame = fromViewController.view.frame;
25 | toViewController.view.frame = [transitionContext finalFrameForViewController:toViewController];
26 | toViewController.view.alpha = 0;
27 | [containerView addSubview:toViewController.view];
28 | [containerView addSubview:imageSnapshot];
29 |
30 | [UIView animateWithDuration:duration animations:^{
31 | toViewController.view.alpha = 1.0;
32 | imageSnapshot.alpha = 0.0;
33 | imageSnapshot.transform=CGAffineTransformTranslate(imageSnapshot.transform, 0, -100);
34 | } completion:^(BOOL finished) {
35 | NSLog(@"remove screenshot-----------");
36 | [imageSnapshot removeFromSuperview];
37 | fromViewController.view.transform = CGAffineTransformIdentity;
38 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled];
39 | }];
40 | }
41 |
42 | - (NSTimeInterval)transitionDuration:(id)transitionContext {
43 | return 0.5;
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "FirstViewController.h"
11 |
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
21 |
22 | FirstViewController *rootVC = [[FirstViewController alloc] init];
23 | UINavigationController *rootNavigationController = [[UINavigationController alloc] initWithRootViewController:rootVC];
24 |
25 | self.window.rootViewController = rootNavigationController;
26 | self.window.backgroundColor = [UIColor whiteColor];
27 | [self.window makeKeyAndVisible];
28 | return YES;
29 | }
30 |
31 | - (void)applicationWillResignActive:(UIApplication *)application {
32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
33 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
34 | }
35 |
36 | - (void)applicationDidEnterBackground:(UIApplication *)application {
37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
39 | }
40 |
41 | - (void)applicationWillEnterForeground:(UIApplication *)application {
42 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
43 | }
44 |
45 | - (void)applicationDidBecomeActive:(UIApplication *)application {
46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
47 | }
48 |
49 | - (void)applicationWillTerminate:(UIApplication *)application {
50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition/FirstViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // BHPullUpTransition
4 | //
5 | // Created by libohao on 15/8/13.
6 | // Copyright (c) 2015年 libohao. All rights reserved.
7 | //
8 |
9 | #import "FirstViewController.h"
10 | #import "SecondViewController.h"
11 | #import "BHTransitionFromFirstToSecond.h"
12 |
13 | @interface FirstViewController ()
14 |
15 | @property (nonatomic, strong) UIImageView* backGroundImageView;
16 | @property (nonatomic, strong) UIPercentDrivenInteractiveTransition *interactivePushTransition;
17 | @property (nonatomic, strong) UIPanGestureRecognizer *panRecognizer;
18 |
19 | @end
20 |
21 | @implementation FirstViewController
22 |
23 | #pragma Property
24 |
25 | - (UIImageView* )backGroundImageView {
26 | if (!_backGroundImageView) {
27 | _backGroundImageView = [[UIImageView alloc]initWithFrame:self.view.bounds];
28 | _backGroundImageView.image = [UIImage imageNamed:@"2"];
29 | }
30 | return _backGroundImageView;
31 | }
32 |
33 | #pragma mark - Life Cycle
34 |
35 | - (void)viewDidLoad {
36 | [super viewDidLoad];
37 | self.view.backgroundColor = [UIColor whiteColor];
38 | [self.view addSubview:self.backGroundImageView];
39 | }
40 |
41 | - (void)didReceiveMemoryWarning {
42 | [super didReceiveMemoryWarning];
43 | }
44 |
45 | - (void)viewDidAppear:(BOOL)animated {
46 | self.navigationController.delegate = self;
47 | self.panRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanRecognizer:)];
48 | [self.view addGestureRecognizer:self.panRecognizer];
49 | }
50 |
51 | - (void)viewDidDisappear:(BOOL)animated {
52 | if (self.navigationController.delegate == self) {
53 | self.navigationController.delegate = nil;
54 | }
55 | }
56 |
57 |
58 |
59 | #pragma mark UINavigationControllerDelegate methods
60 |
61 | - (id)navigationController:(UINavigationController *)navigationController
62 | animationControllerForOperation:(UINavigationControllerOperation)operation
63 | fromViewController:(UIViewController *)fromVC
64 | toViewController:(UIViewController *)toVC {
65 | if (fromVC == self && [toVC isKindOfClass:[SecondViewController class]]) {
66 | return [[BHTransitionFromFirstToSecond alloc] init];
67 | }
68 | else {
69 | return nil;
70 | }
71 | }
72 |
73 | - (id)navigationController:(UINavigationController *)navigationController
74 | interactionControllerForAnimationController:(id)animationController {
75 | if ([animationController isKindOfClass:[BHTransitionFromFirstToSecond class]]) {
76 | return self.interactivePushTransition;
77 | }
78 | else {
79 | return nil;
80 | }
81 | }
82 |
83 | - (void)handlePanRecognizer:(UIPanGestureRecognizer*)recognizer {
84 | static CGFloat startLocationY = 0;
85 | CGPoint location = [recognizer locationInView:self.view];
86 | CGFloat progress = (location.y - startLocationY) / [UIScreen mainScreen].bounds.size.width;
87 | progress = -progress;
88 | //NSLog(@"progress: %.2f", progress);
89 |
90 | progress = MIN(1.0, MAX(0.0, progress));
91 |
92 | if (recognizer.state == UIGestureRecognizerStateBegan) {
93 | startLocationY = location.y;
94 | self.interactivePushTransition = [[UIPercentDrivenInteractiveTransition alloc] init];
95 | SecondViewController* vc = [[SecondViewController alloc]init];
96 | [self.navigationController pushViewController:vc animated:YES];
97 | }
98 | else if (recognizer.state == UIGestureRecognizerStateChanged) {
99 | CGFloat offset = location.y - startLocationY;
100 | NSLog(@"progress: %.2f", offset);
101 | [self.interactivePushTransition updateInteractiveTransition:progress];
102 | }
103 | else if (recognizer.state == UIGestureRecognizerStateEnded || recognizer.state == UIGestureRecognizerStateCancelled) {
104 | if (progress > 0.3) {
105 | self.interactivePushTransition.completionSpeed = 0.4;
106 | [self.interactivePushTransition finishInteractiveTransition];
107 | }
108 | else {
109 | self.interactivePushTransition.completionSpeed = 0.3;
110 | [self.interactivePushTransition cancelInteractiveTransition];
111 | }
112 | self.interactivePushTransition = nil;
113 | }
114 |
115 | }
116 |
117 |
118 | @end
119 |
--------------------------------------------------------------------------------
/BHPullUpTransition/BHPullUpTransition.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | CE3AC5031B7C6BF200F0918C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC5021B7C6BF200F0918C /* main.m */; };
11 | CE3AC5061B7C6BF200F0918C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC5051B7C6BF200F0918C /* AppDelegate.m */; };
12 | CE3AC5091B7C6BF200F0918C /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC5081B7C6BF200F0918C /* FirstViewController.m */; };
13 | CE3AC50E1B7C6BF200F0918C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CE3AC50D1B7C6BF200F0918C /* Images.xcassets */; };
14 | CE3AC51D1B7C6BF200F0918C /* BHPullUpTransitionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC51C1B7C6BF200F0918C /* BHPullUpTransitionTests.m */; };
15 | CE3AC5281B7C6C3500F0918C /* BHTransitionFromFirstToSecond.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC5271B7C6C3500F0918C /* BHTransitionFromFirstToSecond.m */; };
16 | CE3AC52C1B7C6C8200F0918C /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3AC52A1B7C6C8200F0918C /* SecondViewController.m */; };
17 | CE3AC58E1B7C889100F0918C /* 1.png in Resources */ = {isa = PBXBuildFile; fileRef = CE3AC58C1B7C889100F0918C /* 1.png */; };
18 | CE3AC58F1B7C889100F0918C /* 2.png in Resources */ = {isa = PBXBuildFile; fileRef = CE3AC58D1B7C889100F0918C /* 2.png */; };
19 | /* End PBXBuildFile section */
20 |
21 | /* Begin PBXContainerItemProxy section */
22 | CE3AC5171B7C6BF200F0918C /* PBXContainerItemProxy */ = {
23 | isa = PBXContainerItemProxy;
24 | containerPortal = CE3AC4F51B7C6BF200F0918C /* Project object */;
25 | proxyType = 1;
26 | remoteGlobalIDString = CE3AC4FC1B7C6BF200F0918C;
27 | remoteInfo = BHPullUpTransition;
28 | };
29 | /* End PBXContainerItemProxy section */
30 |
31 | /* Begin PBXFileReference section */
32 | CE3AC4FD1B7C6BF200F0918C /* BHPullUpTransition.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BHPullUpTransition.app; sourceTree = BUILT_PRODUCTS_DIR; };
33 | CE3AC5011B7C6BF200F0918C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
34 | CE3AC5021B7C6BF200F0918C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
35 | CE3AC5041B7C6BF200F0918C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
36 | CE3AC5051B7C6BF200F0918C /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
37 | CE3AC5071B7C6BF200F0918C /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; };
38 | CE3AC5081B7C6BF200F0918C /* FirstViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; };
39 | CE3AC50D1B7C6BF200F0918C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
40 | CE3AC5161B7C6BF200F0918C /* BHPullUpTransitionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHPullUpTransitionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
41 | CE3AC51B1B7C6BF200F0918C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
42 | CE3AC51C1B7C6BF200F0918C /* BHPullUpTransitionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHPullUpTransitionTests.m; sourceTree = ""; };
43 | CE3AC5261B7C6C3500F0918C /* BHTransitionFromFirstToSecond.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BHTransitionFromFirstToSecond.h; sourceTree = ""; };
44 | CE3AC5271B7C6C3500F0918C /* BHTransitionFromFirstToSecond.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BHTransitionFromFirstToSecond.m; sourceTree = ""; };
45 | CE3AC5291B7C6C8200F0918C /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; };
46 | CE3AC52A1B7C6C8200F0918C /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; };
47 | CE3AC58C1B7C889100F0918C /* 1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 1.png; path = resources/1.png; sourceTree = ""; };
48 | CE3AC58D1B7C889100F0918C /* 2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = 2.png; path = resources/2.png; sourceTree = ""; };
49 | /* End PBXFileReference section */
50 |
51 | /* Begin PBXFrameworksBuildPhase section */
52 | CE3AC4FA1B7C6BF200F0918C /* Frameworks */ = {
53 | isa = PBXFrameworksBuildPhase;
54 | buildActionMask = 2147483647;
55 | files = (
56 | );
57 | runOnlyForDeploymentPostprocessing = 0;
58 | };
59 | CE3AC5131B7C6BF200F0918C /* Frameworks */ = {
60 | isa = PBXFrameworksBuildPhase;
61 | buildActionMask = 2147483647;
62 | files = (
63 | );
64 | runOnlyForDeploymentPostprocessing = 0;
65 | };
66 | /* End PBXFrameworksBuildPhase section */
67 |
68 | /* Begin PBXGroup section */
69 | CE3AC4F41B7C6BF200F0918C = {
70 | isa = PBXGroup;
71 | children = (
72 | CE3AC4FF1B7C6BF200F0918C /* BHPullUpTransition */,
73 | CE3AC5191B7C6BF200F0918C /* BHPullUpTransitionTests */,
74 | CE3AC4FE1B7C6BF200F0918C /* Products */,
75 | );
76 | sourceTree = "";
77 | };
78 | CE3AC4FE1B7C6BF200F0918C /* Products */ = {
79 | isa = PBXGroup;
80 | children = (
81 | CE3AC4FD1B7C6BF200F0918C /* BHPullUpTransition.app */,
82 | CE3AC5161B7C6BF200F0918C /* BHPullUpTransitionTests.xctest */,
83 | );
84 | name = Products;
85 | sourceTree = "";
86 | };
87 | CE3AC4FF1B7C6BF200F0918C /* BHPullUpTransition */ = {
88 | isa = PBXGroup;
89 | children = (
90 | CE3AC5041B7C6BF200F0918C /* AppDelegate.h */,
91 | CE3AC5051B7C6BF200F0918C /* AppDelegate.m */,
92 | CE3AC5261B7C6C3500F0918C /* BHTransitionFromFirstToSecond.h */,
93 | CE3AC5271B7C6C3500F0918C /* BHTransitionFromFirstToSecond.m */,
94 | CE3AC5071B7C6BF200F0918C /* FirstViewController.h */,
95 | CE3AC5081B7C6BF200F0918C /* FirstViewController.m */,
96 | CE3AC5291B7C6C8200F0918C /* SecondViewController.h */,
97 | CE3AC52A1B7C6C8200F0918C /* SecondViewController.m */,
98 | CE3AC50D1B7C6BF200F0918C /* Images.xcassets */,
99 | CE3AC58C1B7C889100F0918C /* 1.png */,
100 | CE3AC58D1B7C889100F0918C /* 2.png */,
101 | CE3AC5001B7C6BF200F0918C /* Supporting Files */,
102 | );
103 | path = BHPullUpTransition;
104 | sourceTree = "";
105 | };
106 | CE3AC5001B7C6BF200F0918C /* Supporting Files */ = {
107 | isa = PBXGroup;
108 | children = (
109 | CE3AC5011B7C6BF200F0918C /* Info.plist */,
110 | CE3AC5021B7C6BF200F0918C /* main.m */,
111 | );
112 | name = "Supporting Files";
113 | sourceTree = "";
114 | };
115 | CE3AC5191B7C6BF200F0918C /* BHPullUpTransitionTests */ = {
116 | isa = PBXGroup;
117 | children = (
118 | CE3AC51C1B7C6BF200F0918C /* BHPullUpTransitionTests.m */,
119 | CE3AC51A1B7C6BF200F0918C /* Supporting Files */,
120 | );
121 | path = BHPullUpTransitionTests;
122 | sourceTree = "";
123 | };
124 | CE3AC51A1B7C6BF200F0918C /* Supporting Files */ = {
125 | isa = PBXGroup;
126 | children = (
127 | CE3AC51B1B7C6BF200F0918C /* Info.plist */,
128 | );
129 | name = "Supporting Files";
130 | sourceTree = "";
131 | };
132 | /* End PBXGroup section */
133 |
134 | /* Begin PBXNativeTarget section */
135 | CE3AC4FC1B7C6BF200F0918C /* BHPullUpTransition */ = {
136 | isa = PBXNativeTarget;
137 | buildConfigurationList = CE3AC5201B7C6BF200F0918C /* Build configuration list for PBXNativeTarget "BHPullUpTransition" */;
138 | buildPhases = (
139 | CE3AC4F91B7C6BF200F0918C /* Sources */,
140 | CE3AC4FA1B7C6BF200F0918C /* Frameworks */,
141 | CE3AC4FB1B7C6BF200F0918C /* Resources */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | );
147 | name = BHPullUpTransition;
148 | productName = BHPullUpTransition;
149 | productReference = CE3AC4FD1B7C6BF200F0918C /* BHPullUpTransition.app */;
150 | productType = "com.apple.product-type.application";
151 | };
152 | CE3AC5151B7C6BF200F0918C /* BHPullUpTransitionTests */ = {
153 | isa = PBXNativeTarget;
154 | buildConfigurationList = CE3AC5231B7C6BF200F0918C /* Build configuration list for PBXNativeTarget "BHPullUpTransitionTests" */;
155 | buildPhases = (
156 | CE3AC5121B7C6BF200F0918C /* Sources */,
157 | CE3AC5131B7C6BF200F0918C /* Frameworks */,
158 | CE3AC5141B7C6BF200F0918C /* Resources */,
159 | );
160 | buildRules = (
161 | );
162 | dependencies = (
163 | CE3AC5181B7C6BF200F0918C /* PBXTargetDependency */,
164 | );
165 | name = BHPullUpTransitionTests;
166 | productName = BHPullUpTransitionTests;
167 | productReference = CE3AC5161B7C6BF200F0918C /* BHPullUpTransitionTests.xctest */;
168 | productType = "com.apple.product-type.bundle.unit-test";
169 | };
170 | /* End PBXNativeTarget section */
171 |
172 | /* Begin PBXProject section */
173 | CE3AC4F51B7C6BF200F0918C /* Project object */ = {
174 | isa = PBXProject;
175 | attributes = {
176 | LastUpgradeCheck = 0620;
177 | ORGANIZATIONNAME = libohao;
178 | TargetAttributes = {
179 | CE3AC4FC1B7C6BF200F0918C = {
180 | CreatedOnToolsVersion = 6.2;
181 | };
182 | CE3AC5151B7C6BF200F0918C = {
183 | CreatedOnToolsVersion = 6.2;
184 | TestTargetID = CE3AC4FC1B7C6BF200F0918C;
185 | };
186 | };
187 | };
188 | buildConfigurationList = CE3AC4F81B7C6BF200F0918C /* Build configuration list for PBXProject "BHPullUpTransition" */;
189 | compatibilityVersion = "Xcode 3.2";
190 | developmentRegion = English;
191 | hasScannedForEncodings = 0;
192 | knownRegions = (
193 | en,
194 | Base,
195 | );
196 | mainGroup = CE3AC4F41B7C6BF200F0918C;
197 | productRefGroup = CE3AC4FE1B7C6BF200F0918C /* Products */;
198 | projectDirPath = "";
199 | projectRoot = "";
200 | targets = (
201 | CE3AC4FC1B7C6BF200F0918C /* BHPullUpTransition */,
202 | CE3AC5151B7C6BF200F0918C /* BHPullUpTransitionTests */,
203 | );
204 | };
205 | /* End PBXProject section */
206 |
207 | /* Begin PBXResourcesBuildPhase section */
208 | CE3AC4FB1B7C6BF200F0918C /* Resources */ = {
209 | isa = PBXResourcesBuildPhase;
210 | buildActionMask = 2147483647;
211 | files = (
212 | CE3AC58F1B7C889100F0918C /* 2.png in Resources */,
213 | CE3AC50E1B7C6BF200F0918C /* Images.xcassets in Resources */,
214 | CE3AC58E1B7C889100F0918C /* 1.png in Resources */,
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | };
218 | CE3AC5141B7C6BF200F0918C /* Resources */ = {
219 | isa = PBXResourcesBuildPhase;
220 | buildActionMask = 2147483647;
221 | files = (
222 | );
223 | runOnlyForDeploymentPostprocessing = 0;
224 | };
225 | /* End PBXResourcesBuildPhase section */
226 |
227 | /* Begin PBXSourcesBuildPhase section */
228 | CE3AC4F91B7C6BF200F0918C /* Sources */ = {
229 | isa = PBXSourcesBuildPhase;
230 | buildActionMask = 2147483647;
231 | files = (
232 | CE3AC52C1B7C6C8200F0918C /* SecondViewController.m in Sources */,
233 | CE3AC5281B7C6C3500F0918C /* BHTransitionFromFirstToSecond.m in Sources */,
234 | CE3AC5091B7C6BF200F0918C /* FirstViewController.m in Sources */,
235 | CE3AC5061B7C6BF200F0918C /* AppDelegate.m in Sources */,
236 | CE3AC5031B7C6BF200F0918C /* main.m in Sources */,
237 | );
238 | runOnlyForDeploymentPostprocessing = 0;
239 | };
240 | CE3AC5121B7C6BF200F0918C /* Sources */ = {
241 | isa = PBXSourcesBuildPhase;
242 | buildActionMask = 2147483647;
243 | files = (
244 | CE3AC51D1B7C6BF200F0918C /* BHPullUpTransitionTests.m in Sources */,
245 | );
246 | runOnlyForDeploymentPostprocessing = 0;
247 | };
248 | /* End PBXSourcesBuildPhase section */
249 |
250 | /* Begin PBXTargetDependency section */
251 | CE3AC5181B7C6BF200F0918C /* PBXTargetDependency */ = {
252 | isa = PBXTargetDependency;
253 | target = CE3AC4FC1B7C6BF200F0918C /* BHPullUpTransition */;
254 | targetProxy = CE3AC5171B7C6BF200F0918C /* PBXContainerItemProxy */;
255 | };
256 | /* End PBXTargetDependency section */
257 |
258 | /* Begin XCBuildConfiguration section */
259 | CE3AC51E1B7C6BF200F0918C /* Debug */ = {
260 | isa = XCBuildConfiguration;
261 | buildSettings = {
262 | ALWAYS_SEARCH_USER_PATHS = NO;
263 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
264 | CLANG_CXX_LIBRARY = "libc++";
265 | CLANG_ENABLE_MODULES = YES;
266 | CLANG_ENABLE_OBJC_ARC = YES;
267 | CLANG_WARN_BOOL_CONVERSION = YES;
268 | CLANG_WARN_CONSTANT_CONVERSION = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INT_CONVERSION = YES;
273 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
274 | CLANG_WARN_UNREACHABLE_CODE = YES;
275 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
276 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
277 | COPY_PHASE_STRIP = NO;
278 | ENABLE_STRICT_OBJC_MSGSEND = YES;
279 | GCC_C_LANGUAGE_STANDARD = gnu99;
280 | GCC_DYNAMIC_NO_PIC = NO;
281 | GCC_OPTIMIZATION_LEVEL = 0;
282 | GCC_PREPROCESSOR_DEFINITIONS = (
283 | "DEBUG=1",
284 | "$(inherited)",
285 | );
286 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
287 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
288 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
289 | GCC_WARN_UNDECLARED_SELECTOR = YES;
290 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
291 | GCC_WARN_UNUSED_FUNCTION = YES;
292 | GCC_WARN_UNUSED_VARIABLE = YES;
293 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
294 | MTL_ENABLE_DEBUG_INFO = YES;
295 | ONLY_ACTIVE_ARCH = YES;
296 | SDKROOT = iphoneos;
297 | };
298 | name = Debug;
299 | };
300 | CE3AC51F1B7C6BF200F0918C /* Release */ = {
301 | isa = XCBuildConfiguration;
302 | buildSettings = {
303 | ALWAYS_SEARCH_USER_PATHS = NO;
304 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
305 | CLANG_CXX_LIBRARY = "libc++";
306 | CLANG_ENABLE_MODULES = YES;
307 | CLANG_ENABLE_OBJC_ARC = YES;
308 | CLANG_WARN_BOOL_CONVERSION = YES;
309 | CLANG_WARN_CONSTANT_CONVERSION = YES;
310 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
311 | CLANG_WARN_EMPTY_BODY = YES;
312 | CLANG_WARN_ENUM_CONVERSION = YES;
313 | CLANG_WARN_INT_CONVERSION = YES;
314 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
315 | CLANG_WARN_UNREACHABLE_CODE = YES;
316 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
318 | COPY_PHASE_STRIP = NO;
319 | ENABLE_NS_ASSERTIONS = NO;
320 | ENABLE_STRICT_OBJC_MSGSEND = YES;
321 | GCC_C_LANGUAGE_STANDARD = gnu99;
322 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
323 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
324 | GCC_WARN_UNDECLARED_SELECTOR = YES;
325 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
326 | GCC_WARN_UNUSED_FUNCTION = YES;
327 | GCC_WARN_UNUSED_VARIABLE = YES;
328 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
329 | MTL_ENABLE_DEBUG_INFO = NO;
330 | SDKROOT = iphoneos;
331 | VALIDATE_PRODUCT = YES;
332 | };
333 | name = Release;
334 | };
335 | CE3AC5211B7C6BF200F0918C /* Debug */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
339 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
340 | INFOPLIST_FILE = BHPullUpTransition/Info.plist;
341 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
342 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
343 | PRODUCT_NAME = "$(TARGET_NAME)";
344 | };
345 | name = Debug;
346 | };
347 | CE3AC5221B7C6BF200F0918C /* Release */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
351 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
352 | INFOPLIST_FILE = BHPullUpTransition/Info.plist;
353 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
354 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
355 | PRODUCT_NAME = "$(TARGET_NAME)";
356 | };
357 | name = Release;
358 | };
359 | CE3AC5241B7C6BF200F0918C /* Debug */ = {
360 | isa = XCBuildConfiguration;
361 | buildSettings = {
362 | BUNDLE_LOADER = "$(TEST_HOST)";
363 | FRAMEWORK_SEARCH_PATHS = (
364 | "$(SDKROOT)/Developer/Library/Frameworks",
365 | "$(inherited)",
366 | );
367 | GCC_PREPROCESSOR_DEFINITIONS = (
368 | "DEBUG=1",
369 | "$(inherited)",
370 | );
371 | INFOPLIST_FILE = BHPullUpTransitionTests/Info.plist;
372 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
373 | PRODUCT_NAME = "$(TARGET_NAME)";
374 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHPullUpTransition.app/BHPullUpTransition";
375 | };
376 | name = Debug;
377 | };
378 | CE3AC5251B7C6BF200F0918C /* Release */ = {
379 | isa = XCBuildConfiguration;
380 | buildSettings = {
381 | BUNDLE_LOADER = "$(TEST_HOST)";
382 | FRAMEWORK_SEARCH_PATHS = (
383 | "$(SDKROOT)/Developer/Library/Frameworks",
384 | "$(inherited)",
385 | );
386 | INFOPLIST_FILE = BHPullUpTransitionTests/Info.plist;
387 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
388 | PRODUCT_NAME = "$(TARGET_NAME)";
389 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHPullUpTransition.app/BHPullUpTransition";
390 | };
391 | name = Release;
392 | };
393 | /* End XCBuildConfiguration section */
394 |
395 | /* Begin XCConfigurationList section */
396 | CE3AC4F81B7C6BF200F0918C /* Build configuration list for PBXProject "BHPullUpTransition" */ = {
397 | isa = XCConfigurationList;
398 | buildConfigurations = (
399 | CE3AC51E1B7C6BF200F0918C /* Debug */,
400 | CE3AC51F1B7C6BF200F0918C /* Release */,
401 | );
402 | defaultConfigurationIsVisible = 0;
403 | defaultConfigurationName = Release;
404 | };
405 | CE3AC5201B7C6BF200F0918C /* Build configuration list for PBXNativeTarget "BHPullUpTransition" */ = {
406 | isa = XCConfigurationList;
407 | buildConfigurations = (
408 | CE3AC5211B7C6BF200F0918C /* Debug */,
409 | CE3AC5221B7C6BF200F0918C /* Release */,
410 | );
411 | defaultConfigurationIsVisible = 0;
412 | defaultConfigurationName = Release;
413 | };
414 | CE3AC5231B7C6BF200F0918C /* Build configuration list for PBXNativeTarget "BHPullUpTransitionTests" */ = {
415 | isa = XCConfigurationList;
416 | buildConfigurations = (
417 | CE3AC5241B7C6BF200F0918C /* Debug */,
418 | CE3AC5251B7C6BF200F0918C /* Release */,
419 | );
420 | defaultConfigurationIsVisible = 0;
421 | defaultConfigurationName = Release;
422 | };
423 | /* End XCConfigurationList section */
424 | };
425 | rootObject = CE3AC4F51B7C6BF200F0918C /* Project object */;
426 | }
427 |
--------------------------------------------------------------------------------