├── .DS_Store ├── .gitignore ├── LICENSE.md ├── M6ParallaxController.h ├── M6ParallaxController.m ├── README.md ├── Sample Storyboard ├── .DS_Store ├── Sample Storyboard.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── Paulis.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── Paulis.xcuserdatad │ │ ├── xcdebugger │ │ └── Breakpoints.xcbkptlist │ │ └── xcschemes │ │ ├── Sample Storyboard.xcscheme │ │ └── xcschememanagement.plist └── Sample Storyboard │ ├── .DS_Store │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── MyParallaxController.h │ ├── MyParallaxController.m │ ├── MyTableViewController.h │ ├── MyTableViewController.m │ ├── MyTopViewController.h │ ├── MyTopViewController.m │ ├── Sample Storyboard-Info.plist │ ├── Sample Storyboard-Prefix.pch │ ├── bg.jpg │ ├── en.lproj │ ├── InfoPlist.strings │ └── MainStoryboard.storyboard │ ├── gradient-over-image@2x.png │ ├── gradient_overlay@2x.png │ └── main.m ├── Sample ├── .DS_Store └── Sample │ ├── .DS_Store │ ├── Sample.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── Sample.xccheckout │ │ └── xcuserdata │ │ │ └── Paulis.xcuserdatad │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ └── WorkspaceSettings.xcsettings │ └── xcuserdata │ │ └── Paulis.xcuserdatad │ │ ├── xcdebugger │ │ ├── Breakpoints.xcbkptlist │ │ └── Breakpoints_v2.xcbkptlist │ │ └── xcschemes │ │ ├── Sample.xcscheme │ │ └── xcschememanagement.plist │ └── Sample │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Default-568h@2x.png │ ├── Default.png │ ├── Default@2x.png │ ├── MyMasterParallaxController.h │ ├── MyMasterParallaxController.m │ ├── MyTableViewController.h │ ├── MyTableViewController.m │ ├── MyTableViewController.xib │ ├── MyTopViewController.h │ ├── MyTopViewController.m │ ├── MyTopViewController.xib │ ├── Sample-Info.plist │ ├── Sample-Prefix.pch │ ├── bg.jpg │ ├── en.lproj │ └── InfoPlist.strings │ ├── gradient-over-image@2x.png │ ├── gradient_overlay@2x.png │ └── main.m ├── UIViewController+M6ParallaxController.h └── UIViewController+M6ParallaxController.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | *.xcuserstate 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /M6ParallaxController.h: -------------------------------------------------------------------------------- 1 | // 2 | // M6ParallaxTableViewController.h 3 | // M6ParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIViewController+M6ParallaxController.h" 11 | 12 | @class M6ParallaxController; 13 | 14 | @interface M6ParallaxController : UIViewController 15 | 16 | @property (nonatomic, assign, readonly) CGFloat topViewControllerStandartHeight; 17 | 18 | @property (nonatomic, strong, readonly) UIViewController * topViewController; 19 | @property (nonatomic, strong, readonly) UITableViewController * tableViewController; 20 | 21 | - (void)setupWithTopViewController:(UIViewController *)topViewController height:(CGFloat)height tableViewController:(UITableViewController *)tableViewController; 22 | 23 | - (void)tableViewControllerDidScroll:(UITableViewController *)tableViewController; 24 | 25 | // overwrite to provide custom functionality 26 | - (void)willChangeHeightOfTopViewControllerFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight; 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /M6ParallaxController.m: -------------------------------------------------------------------------------- 1 | // 2 | // M6ParallaxTableViewController.m 3 | // M6ParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "M6ParallaxController.h" 10 | 11 | @interface M6ParallaxController () 12 | 13 | @property (nonatomic, strong, readwrite) UIViewController * topViewController; 14 | @property (nonatomic, strong, readwrite) UITableViewController * tableViewController; 15 | 16 | @property (nonatomic, assign, readwrite) CGFloat topViewControllerStandartHeight; 17 | 18 | @end 19 | 20 | @implementation M6ParallaxController 21 | 22 | - (void)viewDidLoad 23 | { 24 | [super viewDidLoad]; 25 | } 26 | 27 | - (void)didReceiveMemoryWarning 28 | { 29 | [super didReceiveMemoryWarning]; 30 | } 31 | 32 | //////////////////////////////////////////////////////////////////////// 33 | #pragma mark - Public 34 | //////////////////////////////////////////////////////////////////////// 35 | 36 | - (void)setupWithTopViewController:(UIViewController *)topViewController height:(CGFloat)height tableViewController:(UITableViewController *)tableViewController { 37 | 38 | self.topViewControllerStandartHeight = height; 39 | 40 | [tableViewController.tableView setBackgroundColor:[UIColor clearColor]]; 41 | [tableViewController.tableView setBackgroundView:nil]; 42 | [topViewController.view setClipsToBounds:YES]; 43 | [tableViewController.view setClipsToBounds:YES]; 44 | 45 | [self addChildViewController:topViewController]; 46 | [self.view addSubview:topViewController.view]; 47 | [topViewController didMoveToParentViewController:self]; 48 | 49 | [self addChildViewController:tableViewController]; 50 | [self.view addSubview:tableViewController.view]; 51 | [tableViewController didMoveToParentViewController:self]; 52 | 53 | tableViewController.tableView.frame = self.view.bounds; 54 | 55 | topViewController.view.frame = CGRectMake(0, 0, self.view.bounds.size.width, self.topViewControllerStandartHeight); 56 | tableViewController.tableView.contentInset = UIEdgeInsetsMake(topViewController.view.frame.size.height, 0, 0, 0); 57 | 58 | self.topViewController = topViewController; 59 | self.tableViewController = tableViewController; 60 | 61 | } 62 | 63 | - (void)tableViewControllerDidScroll:(UITableViewController *)tableViewController { 64 | 65 | if (tableViewController != self.tableViewController) { 66 | return; 67 | } 68 | 69 | UITableView * tableView = self.tableViewController.tableView; 70 | UIView * parallaxView = self.topViewController.view; 71 | 72 | float y = tableView.contentOffset.y + self.topViewControllerStandartHeight; 73 | 74 | CGRect currentParallaxFrame = parallaxView.frame; 75 | 76 | if (y > 0) { 77 | 78 | CGFloat newHeight = self.topViewControllerStandartHeight - y; 79 | 80 | [parallaxView setHidden:(newHeight <= 0)]; 81 | 82 | if (!parallaxView.hidden) { 83 | 84 | [self willChangeHeightOfTopViewControllerFromHeight:parallaxView.frame.size.height toHeight:newHeight]; 85 | 86 | parallaxView.frame = CGRectMake(currentParallaxFrame.origin.x, currentParallaxFrame.origin.y, currentParallaxFrame.size.width, newHeight); 87 | 88 | } 89 | 90 | //uncomment if you want to support section headers - doesnt work 100% 91 | // if (y >= self.topViewControllerStandartHeight) { 92 | // 93 | // tableView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0); 94 | // 95 | // } else { 96 | // 97 | // tableView.contentInset = UIEdgeInsetsMake(self.topViewControllerStandartHeight - y, 0, 0, 0); 98 | // 99 | // } 100 | 101 | } else { 102 | 103 | [parallaxView setHidden:NO]; 104 | 105 | CGFloat newHeight = self.topViewControllerStandartHeight - y; 106 | 107 | [self willChangeHeightOfTopViewControllerFromHeight:parallaxView.frame.size.height toHeight:newHeight]; 108 | 109 | parallaxView.frame = CGRectMake(currentParallaxFrame.origin.x, currentParallaxFrame.origin.y, currentParallaxFrame.size.width, newHeight); 110 | 111 | //uncomment if you want to support section headers - doesnt work 100% 112 | // tableView.contentInset = UIEdgeInsetsMake(self.topViewControllerStandartHeight, 0, 0, 0); 113 | 114 | } 115 | 116 | [tableView setShowsVerticalScrollIndicator:parallaxView.hidden]; 117 | 118 | } 119 | 120 | - (void)willChangeHeightOfTopViewControllerFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight { 121 | 122 | } 123 | 124 | 125 | @end 126 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | THIS IS DISCONTINUED, SEE THIS FOLLOWUP PROJECT 2 | ==================== 3 | 4 | M6UniversalParallaxViewController 5 | https://github.com/peterpaulis/M6UniversalParallaxViewController 6 | 7 | M6ParallaxController 8 | ==================== 9 | 10 | Parallax controller for a parallaxed view and a table view 11 | 12 | Version 1.1 13 | - Perfect smooth scrolling, however table section headers are no longer fully supported 14 | - Updated samples, with code to handle clicking on the top parallaxed view 15 | - Changed handling of height change 16 | 17 | ##Usage (Without storyboards) 18 | 19 | - see sample 20 | 21 | ##Storyboard Usage 22 | 23 | - Add M6ParallaxTableViewController.h / .m and UIViewController+M6ParallaxController.h / .m to your project 24 | - Create a new ViewController, which subclasses M6ParallaxController 25 | 26 | ``` objective-c 27 | #import 28 | #import "M6ParallaxController.h" 29 | 30 | @interface MyParallaxController : M6ParallaxController 31 | 32 | @end 33 | ``` 34 | 35 | - In storyboard, create a view controller and set its class to MyParallaxController 36 | - Add a UIViewController, which will be parallaxed. Set its Storyboard ID to let's say "ParallaxedViewController" 37 | - Add a UITableViewController, and create a custom class for it, lets say MyTableViewController (which subclasses the UITableViewController). Inside your implementation of MyTableViewController add : 38 | 39 | ``` objective-c 40 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 41 | 42 | [self.parallaxController tableViewControllerDidScroll:self]; 43 | 44 | } 45 | ``` 46 | 47 | - Assign a StoryboardID to your MyTableViewController, let's say "MyTableViewController" 48 | - In my MyParallaxController add 49 | 50 | ``` objective-c 51 | -(void) awakeFromNib 52 | { 53 | UIViewController * vc = [self.storyboard instantiateViewControllerWithIdentifier:@"ParallaxedViewController"]; 54 | UITableViewController * tvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MyTableViewController"]; 55 | 56 | [self setupWithTopViewController:vc height:100 tableViewController:tvc]; 57 | } 58 | ``` 59 | 60 | ##Special effects 61 | - if you want to perform special action on resizing the parallaxed view (as in sample) 62 | - in your custom subclass of M6ParallaxController overwrite this method 63 | 64 | ``` objective-c 65 | - (void)willChangeHeightOfTopViewControllerFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight; 66 | ``` 67 | 68 | - inside implement custom functionality (see sample) 69 | 70 | ##Tapping the top parallaxed controller 71 | - to handle interaction on the top parallaxed controller, you need to add a tap gesture recognizer as in the sample 72 | - to recognize tapping on a specific area, you will have to overwrite 73 | ``` objective-c 74 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch 75 | ``` 76 | and test for a specific area 77 | 78 | - see storyboard sample for implementation example 79 | 80 | #Tapping buttons in the top parallaxed controller 81 | 82 | - the key is to add a gesture recognizer and test on the different buttons, than send the action to the button, and handle the click as it would come from a user 83 | - see xib sample for implementationexample 84 | 85 | ``` objective-c 86 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 87 | 88 | CGPoint tapPoint = [touch locationInView:self.view];; 89 | 90 | if (([self.topViewController.view hitTest:tapPoint withEvent:nil])) { 91 | 92 | MyTopViewController * mtvc = (MyTopViewController *)self.topViewController; 93 | 94 | // check for tap into button 1 95 | tapPoint = [touch locationInView:mtvc.button1]; 96 | if ([mtvc.button1 hitTest:tapPoint withEvent:nil]) { 97 | [mtvc.button1 sendActionsForControlEvents:UIControlEventTouchUpInside]; 98 | return YES; 99 | } 100 | 101 | ... 102 | } 103 | 104 | return NO; 105 | } 106 | ``` 107 | 108 | ##Table view sections 109 | - these are no longer supported, to provide a better scrolling experience (however you can enable sections support in M6ParallaxController.m by uncommenting lines, but not that scrolling will not be so smooth) 110 | 111 | ##License 112 | Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt 113 | 114 | ##Issues 115 | There may be an issue with using a navigation controller in that case use the following code. The problem is, that the frame changes, and is not final in viewDidLoad 116 | 117 | ``` objective-c 118 | - (void)viewDidAppear:(BOOL)animated { 119 | 120 | [super viewDidAppear:animated]; 121 | 122 | static dispatch_once_t once; 123 | dispatch_once(&once, ^{ 124 | // setup 125 | { 126 | UIViewController * topViewController = [TopDesireViewController new]; 127 | UITableViewController * tableViewController = [DesiresListingViewController new]; 128 | 129 | [self setupWithTopViewController:topViewController height:230.f tableViewController:tableViewController]; 130 | 131 | } 132 | }); 133 | 134 | } 135 | ``` 136 | 137 | ##Credits 138 | min:60 - Building perfect mobile apps, for affordable price - http://min60.com 139 | 140 | 141 | -------------------------------------------------------------------------------- /Sample Storyboard/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/.DS_Store -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7E814D72171049D1006242AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814D71171049D1006242AA /* UIKit.framework */; }; 11 | 7E814D74171049D1006242AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814D73171049D1006242AA /* Foundation.framework */; }; 12 | 7E814D76171049D1006242AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814D75171049D1006242AA /* CoreGraphics.framework */; }; 13 | 7E814D7C171049D1006242AA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D7A171049D1006242AA /* InfoPlist.strings */; }; 14 | 7E814D7E171049D1006242AA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814D7D171049D1006242AA /* main.m */; }; 15 | 7E814D82171049D1006242AA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814D81171049D1006242AA /* AppDelegate.m */; }; 16 | 7E814D84171049D1006242AA /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D83171049D1006242AA /* Default.png */; }; 17 | 7E814D86171049D1006242AA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D85171049D1006242AA /* Default@2x.png */; }; 18 | 7E814D88171049D1006242AA /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D87171049D1006242AA /* Default-568h@2x.png */; }; 19 | 7E814D8B171049D1006242AA /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D89171049D1006242AA /* MainStoryboard.storyboard */; }; 20 | 7E814D8E171049D1006242AA /* MyParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814D8D171049D1006242AA /* MyParallaxController.m */; }; 21 | 7E814D95171049EB006242AA /* bg.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 7E814D94171049EB006242AA /* bg.jpg */; }; 22 | 7E814D9D17104C81006242AA /* MyTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814D9C17104C81006242AA /* MyTableViewController.m */; }; 23 | 7E814DA017104E58006242AA /* MyTopViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814D9F17104E58006242AA /* MyTopViewController.m */; }; 24 | 7E814DA71710C6D9006242AA /* UIViewController+M6ParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DA41710C6D9006242AA /* UIViewController+M6ParallaxController.m */; }; 25 | 7E814DA81710C6D9006242AA /* M6ParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DA61710C6D9006242AA /* M6ParallaxController.m */; }; 26 | 7ED88358175B91F0005DCC81 /* gradient_overlay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ED88356175B91F0005DCC81 /* gradient_overlay@2x.png */; }; 27 | 7ED88359175B91F0005DCC81 /* gradient-over-image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ED88357175B91F0005DCC81 /* gradient-over-image@2x.png */; }; 28 | /* End PBXBuildFile section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 7E814D6E171049D1006242AA /* Sample Storyboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sample Storyboard.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | 7E814D71171049D1006242AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 33 | 7E814D73171049D1006242AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 34 | 7E814D75171049D1006242AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 35 | 7E814D79171049D1006242AA /* Sample Storyboard-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Sample Storyboard-Info.plist"; sourceTree = ""; }; 36 | 7E814D7B171049D1006242AA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 37 | 7E814D7D171049D1006242AA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 38 | 7E814D7F171049D1006242AA /* Sample Storyboard-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Sample Storyboard-Prefix.pch"; sourceTree = ""; }; 39 | 7E814D80171049D1006242AA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 40 | 7E814D81171049D1006242AA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 41 | 7E814D83171049D1006242AA /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 42 | 7E814D85171049D1006242AA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 43 | 7E814D87171049D1006242AA /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 44 | 7E814D8A171049D1006242AA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = en; path = en.lproj/MainStoryboard.storyboard; sourceTree = ""; }; 45 | 7E814D8C171049D1006242AA /* MyParallaxController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyParallaxController.h; sourceTree = ""; }; 46 | 7E814D8D171049D1006242AA /* MyParallaxController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyParallaxController.m; sourceTree = ""; }; 47 | 7E814D94171049EB006242AA /* bg.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = bg.jpg; sourceTree = ""; }; 48 | 7E814D9B17104C81006242AA /* MyTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTableViewController.h; sourceTree = ""; }; 49 | 7E814D9C17104C81006242AA /* MyTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTableViewController.m; sourceTree = ""; }; 50 | 7E814D9E17104E58006242AA /* MyTopViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTopViewController.h; sourceTree = ""; }; 51 | 7E814D9F17104E58006242AA /* MyTopViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTopViewController.m; sourceTree = ""; }; 52 | 7E814DA31710C6D9006242AA /* UIViewController+M6ParallaxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+M6ParallaxController.h"; path = "../../UIViewController+M6ParallaxController.h"; sourceTree = ""; }; 53 | 7E814DA41710C6D9006242AA /* UIViewController+M6ParallaxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+M6ParallaxController.m"; path = "../../UIViewController+M6ParallaxController.m"; sourceTree = ""; }; 54 | 7E814DA51710C6D9006242AA /* M6ParallaxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = M6ParallaxController.h; path = ../../M6ParallaxController.h; sourceTree = ""; }; 55 | 7E814DA61710C6D9006242AA /* M6ParallaxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = M6ParallaxController.m; path = ../../M6ParallaxController.m; sourceTree = ""; }; 56 | 7ED88356175B91F0005DCC81 /* gradient_overlay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gradient_overlay@2x.png"; sourceTree = ""; }; 57 | 7ED88357175B91F0005DCC81 /* gradient-over-image@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gradient-over-image@2x.png"; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 7E814D6B171049D1006242AA /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 7E814D72171049D1006242AA /* UIKit.framework in Frameworks */, 66 | 7E814D74171049D1006242AA /* Foundation.framework in Frameworks */, 67 | 7E814D76171049D1006242AA /* CoreGraphics.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 7E814D65171049D1006242AA = { 75 | isa = PBXGroup; 76 | children = ( 77 | 7E814D77171049D1006242AA /* Sample Storyboard */, 78 | 7E814D70171049D1006242AA /* Frameworks */, 79 | 7E814D6F171049D1006242AA /* Products */, 80 | ); 81 | sourceTree = ""; 82 | }; 83 | 7E814D6F171049D1006242AA /* Products */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | 7E814D6E171049D1006242AA /* Sample Storyboard.app */, 87 | ); 88 | name = Products; 89 | sourceTree = ""; 90 | }; 91 | 7E814D70171049D1006242AA /* Frameworks */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 7E814D71171049D1006242AA /* UIKit.framework */, 95 | 7E814D73171049D1006242AA /* Foundation.framework */, 96 | 7E814D75171049D1006242AA /* CoreGraphics.framework */, 97 | ); 98 | name = Frameworks; 99 | sourceTree = ""; 100 | }; 101 | 7E814D77171049D1006242AA /* Sample Storyboard */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | 7E814D96171049EF006242AA /* M6ParallaxController */, 105 | 7E814D94171049EB006242AA /* bg.jpg */, 106 | 7E814D80171049D1006242AA /* AppDelegate.h */, 107 | 7E814D81171049D1006242AA /* AppDelegate.m */, 108 | 7E814D89171049D1006242AA /* MainStoryboard.storyboard */, 109 | 7E814D9B17104C81006242AA /* MyTableViewController.h */, 110 | 7E814D9C17104C81006242AA /* MyTableViewController.m */, 111 | 7E814D8C171049D1006242AA /* MyParallaxController.h */, 112 | 7E814D8D171049D1006242AA /* MyParallaxController.m */, 113 | 7E814D9E17104E58006242AA /* MyTopViewController.h */, 114 | 7E814D9F17104E58006242AA /* MyTopViewController.m */, 115 | 7E814D78171049D1006242AA /* Supporting Files */, 116 | ); 117 | path = "Sample Storyboard"; 118 | sourceTree = ""; 119 | }; 120 | 7E814D78171049D1006242AA /* Supporting Files */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 7ED88356175B91F0005DCC81 /* gradient_overlay@2x.png */, 124 | 7ED88357175B91F0005DCC81 /* gradient-over-image@2x.png */, 125 | 7E814D79171049D1006242AA /* Sample Storyboard-Info.plist */, 126 | 7E814D7A171049D1006242AA /* InfoPlist.strings */, 127 | 7E814D7D171049D1006242AA /* main.m */, 128 | 7E814D7F171049D1006242AA /* Sample Storyboard-Prefix.pch */, 129 | 7E814D83171049D1006242AA /* Default.png */, 130 | 7E814D85171049D1006242AA /* Default@2x.png */, 131 | 7E814D87171049D1006242AA /* Default-568h@2x.png */, 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | 7E814D96171049EF006242AA /* M6ParallaxController */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 7E814DA31710C6D9006242AA /* UIViewController+M6ParallaxController.h */, 140 | 7E814DA41710C6D9006242AA /* UIViewController+M6ParallaxController.m */, 141 | 7E814DA51710C6D9006242AA /* M6ParallaxController.h */, 142 | 7E814DA61710C6D9006242AA /* M6ParallaxController.m */, 143 | ); 144 | name = M6ParallaxController; 145 | sourceTree = ""; 146 | }; 147 | /* End PBXGroup section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | 7E814D6D171049D1006242AA /* Sample Storyboard */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 7E814D91171049D1006242AA /* Build configuration list for PBXNativeTarget "Sample Storyboard" */; 153 | buildPhases = ( 154 | 7E814D6A171049D1006242AA /* Sources */, 155 | 7E814D6B171049D1006242AA /* Frameworks */, 156 | 7E814D6C171049D1006242AA /* Resources */, 157 | ); 158 | buildRules = ( 159 | ); 160 | dependencies = ( 161 | ); 162 | name = "Sample Storyboard"; 163 | productName = "Sample Storyboard"; 164 | productReference = 7E814D6E171049D1006242AA /* Sample Storyboard.app */; 165 | productType = "com.apple.product-type.application"; 166 | }; 167 | /* End PBXNativeTarget section */ 168 | 169 | /* Begin PBXProject section */ 170 | 7E814D66171049D1006242AA /* Project object */ = { 171 | isa = PBXProject; 172 | attributes = { 173 | LastUpgradeCheck = 0460; 174 | ORGANIZATIONNAME = "Peter Paulis"; 175 | }; 176 | buildConfigurationList = 7E814D69171049D1006242AA /* Build configuration list for PBXProject "Sample Storyboard" */; 177 | compatibilityVersion = "Xcode 3.2"; 178 | developmentRegion = English; 179 | hasScannedForEncodings = 0; 180 | knownRegions = ( 181 | en, 182 | ); 183 | mainGroup = 7E814D65171049D1006242AA; 184 | productRefGroup = 7E814D6F171049D1006242AA /* Products */; 185 | projectDirPath = ""; 186 | projectRoot = ""; 187 | targets = ( 188 | 7E814D6D171049D1006242AA /* Sample Storyboard */, 189 | ); 190 | }; 191 | /* End PBXProject section */ 192 | 193 | /* Begin PBXResourcesBuildPhase section */ 194 | 7E814D6C171049D1006242AA /* Resources */ = { 195 | isa = PBXResourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | 7E814D7C171049D1006242AA /* InfoPlist.strings in Resources */, 199 | 7E814D84171049D1006242AA /* Default.png in Resources */, 200 | 7E814D86171049D1006242AA /* Default@2x.png in Resources */, 201 | 7E814D88171049D1006242AA /* Default-568h@2x.png in Resources */, 202 | 7E814D8B171049D1006242AA /* MainStoryboard.storyboard in Resources */, 203 | 7E814D95171049EB006242AA /* bg.jpg in Resources */, 204 | 7ED88358175B91F0005DCC81 /* gradient_overlay@2x.png in Resources */, 205 | 7ED88359175B91F0005DCC81 /* gradient-over-image@2x.png in Resources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | /* End PBXResourcesBuildPhase section */ 210 | 211 | /* Begin PBXSourcesBuildPhase section */ 212 | 7E814D6A171049D1006242AA /* Sources */ = { 213 | isa = PBXSourcesBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | 7E814D7E171049D1006242AA /* main.m in Sources */, 217 | 7E814D82171049D1006242AA /* AppDelegate.m in Sources */, 218 | 7E814D8E171049D1006242AA /* MyParallaxController.m in Sources */, 219 | 7E814D9D17104C81006242AA /* MyTableViewController.m in Sources */, 220 | 7E814DA017104E58006242AA /* MyTopViewController.m in Sources */, 221 | 7E814DA71710C6D9006242AA /* UIViewController+M6ParallaxController.m in Sources */, 222 | 7E814DA81710C6D9006242AA /* M6ParallaxController.m in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXVariantGroup section */ 229 | 7E814D7A171049D1006242AA /* InfoPlist.strings */ = { 230 | isa = PBXVariantGroup; 231 | children = ( 232 | 7E814D7B171049D1006242AA /* en */, 233 | ); 234 | name = InfoPlist.strings; 235 | sourceTree = ""; 236 | }; 237 | 7E814D89171049D1006242AA /* MainStoryboard.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 7E814D8A171049D1006242AA /* en */, 241 | ); 242 | name = MainStoryboard.storyboard; 243 | sourceTree = ""; 244 | }; 245 | /* End PBXVariantGroup section */ 246 | 247 | /* Begin XCBuildConfiguration section */ 248 | 7E814D8F171049D1006242AA /* Debug */ = { 249 | isa = XCBuildConfiguration; 250 | buildSettings = { 251 | ALWAYS_SEARCH_USER_PATHS = NO; 252 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 253 | CLANG_CXX_LIBRARY = "libc++"; 254 | CLANG_ENABLE_OBJC_ARC = YES; 255 | CLANG_WARN_CONSTANT_CONVERSION = YES; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 260 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 261 | COPY_PHASE_STRIP = NO; 262 | GCC_C_LANGUAGE_STANDARD = gnu99; 263 | GCC_DYNAMIC_NO_PIC = NO; 264 | GCC_OPTIMIZATION_LEVEL = 0; 265 | GCC_PREPROCESSOR_DEFINITIONS = ( 266 | "DEBUG=1", 267 | "$(inherited)", 268 | ); 269 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 271 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 272 | GCC_WARN_UNUSED_VARIABLE = YES; 273 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 274 | ONLY_ACTIVE_ARCH = YES; 275 | SDKROOT = iphoneos; 276 | }; 277 | name = Debug; 278 | }; 279 | 7E814D90171049D1006242AA /* Release */ = { 280 | isa = XCBuildConfiguration; 281 | buildSettings = { 282 | ALWAYS_SEARCH_USER_PATHS = NO; 283 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 284 | CLANG_CXX_LIBRARY = "libc++"; 285 | CLANG_ENABLE_OBJC_ARC = YES; 286 | CLANG_WARN_CONSTANT_CONVERSION = YES; 287 | CLANG_WARN_EMPTY_BODY = YES; 288 | CLANG_WARN_ENUM_CONVERSION = YES; 289 | CLANG_WARN_INT_CONVERSION = YES; 290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 292 | COPY_PHASE_STRIP = YES; 293 | GCC_C_LANGUAGE_STANDARD = gnu99; 294 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 296 | GCC_WARN_UNUSED_VARIABLE = YES; 297 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 298 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 299 | SDKROOT = iphoneos; 300 | VALIDATE_PRODUCT = YES; 301 | }; 302 | name = Release; 303 | }; 304 | 7E814D92171049D1006242AA /* Debug */ = { 305 | isa = XCBuildConfiguration; 306 | buildSettings = { 307 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 308 | GCC_PREFIX_HEADER = "Sample Storyboard/Sample Storyboard-Prefix.pch"; 309 | INFOPLIST_FILE = "Sample Storyboard/Sample Storyboard-Info.plist"; 310 | PRODUCT_NAME = "$(TARGET_NAME)"; 311 | WRAPPER_EXTENSION = app; 312 | }; 313 | name = Debug; 314 | }; 315 | 7E814D93171049D1006242AA /* Release */ = { 316 | isa = XCBuildConfiguration; 317 | buildSettings = { 318 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 319 | GCC_PREFIX_HEADER = "Sample Storyboard/Sample Storyboard-Prefix.pch"; 320 | INFOPLIST_FILE = "Sample Storyboard/Sample Storyboard-Info.plist"; 321 | PRODUCT_NAME = "$(TARGET_NAME)"; 322 | WRAPPER_EXTENSION = app; 323 | }; 324 | name = Release; 325 | }; 326 | /* End XCBuildConfiguration section */ 327 | 328 | /* Begin XCConfigurationList section */ 329 | 7E814D69171049D1006242AA /* Build configuration list for PBXProject "Sample Storyboard" */ = { 330 | isa = XCConfigurationList; 331 | buildConfigurations = ( 332 | 7E814D8F171049D1006242AA /* Debug */, 333 | 7E814D90171049D1006242AA /* Release */, 334 | ); 335 | defaultConfigurationIsVisible = 0; 336 | defaultConfigurationName = Release; 337 | }; 338 | 7E814D91171049D1006242AA /* Build configuration list for PBXNativeTarget "Sample Storyboard" */ = { 339 | isa = XCConfigurationList; 340 | buildConfigurations = ( 341 | 7E814D92171049D1006242AA /* Debug */, 342 | 7E814D93171049D1006242AA /* Release */, 343 | ); 344 | defaultConfigurationIsVisible = 0; 345 | defaultConfigurationName = Release; 346 | }; 347 | /* End XCConfigurationList section */ 348 | }; 349 | rootObject = 7E814D66171049D1006242AA /* Project object */; 350 | } 351 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcschemes/Sample Storyboard.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Sample Storyboard.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7E814D6D171049D1006242AA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/.DS_Store -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @implementation AppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | // Override point for customization after application launch. 16 | return YES; 17 | } 18 | 19 | - (void)applicationWillResignActive:(UIApplication *)application 20 | { 21 | // 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. 22 | // 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. 23 | } 24 | 25 | - (void)applicationDidEnterBackground:(UIApplication *)application 26 | { 27 | // 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. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | - (void)applicationWillEnterForeground:(UIApplication *)application 32 | { 33 | // 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. 34 | } 35 | 36 | - (void)applicationDidBecomeActive:(UIApplication *)application 37 | { 38 | // 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. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application 42 | { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/Default-568h@2x.png -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/Default.png -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/Default@2x.png -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyParallaxController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "M6ParallaxController.h" 11 | 12 | @interface MyParallaxController : M6ParallaxController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyParallaxController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "MyParallaxController.h" 10 | #import "MyTopViewController.h" 11 | 12 | @interface MyParallaxController () 13 | 14 | @end 15 | 16 | @implementation MyParallaxController 17 | 18 | - (void)viewDidLoad 19 | { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view, typically from a nib. 22 | } 23 | 24 | - (void)didReceiveMemoryWarning 25 | { 26 | [super didReceiveMemoryWarning]; 27 | // Dispose of any resources that can be recreated. 28 | } 29 | 30 | -(void) awakeFromNib 31 | { 32 | UIViewController * topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"ParallaxedViewController"]; 33 | UITableViewController * tableViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MyTableViewController"]; 34 | 35 | [self setupWithTopViewController:topViewController height:150 tableViewController:tableViewController]; 36 | 37 | UITapGestureRecognizer * tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; 38 | tapGestureRecognizer.delegate = self; 39 | [self.view addGestureRecognizer:tapGestureRecognizer]; 40 | 41 | } 42 | 43 | - (void)handleTapGesture:(id)sender { 44 | 45 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Yup" message:@"You pressed" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 46 | [alert show]; 47 | 48 | } 49 | 50 | //////////////////////////////////////////////////////////////////////// 51 | #pragma mark - TapGesture Delegate 52 | //////////////////////////////////////////////////////////////////////// 53 | 54 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 55 | 56 | CGPoint tapPoint = [touch locationInView:self.view]; 57 | if ([self.topViewController.view hitTest:tapPoint withEvent:nil]) { 58 | return YES; 59 | } 60 | return NO; 61 | } 62 | 63 | //////////////////////////////////////////////////////////////////////// 64 | #pragma mark - Public 65 | //////////////////////////////////////////////////////////////////////// 66 | 67 | - (void)willChangeHeightOfTopViewControllerFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight { 68 | 69 | MyTopViewController * topViewController = (MyTopViewController *)self.topViewController; 70 | [topViewController willChangeHeightFromHeight:oldHeight toHeight:newHeight]; 71 | 72 | float r = (self.topViewControllerStandartHeight * 1.5f) / newHeight; 73 | [self.tableViewController.view setAlpha:r*r*r*r*r*r]; 74 | 75 | } 76 | 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "MyTableViewController.h" 10 | #import "M6ParallaxController.h" 11 | 12 | @interface MyTableViewController () 13 | 14 | @end 15 | 16 | @implementation MyTableViewController 17 | 18 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 19 | 20 | [self.parallaxController tableViewControllerDidScroll:self]; 21 | 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyTopViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTopViewController : UIViewController 12 | 13 | - (void)willChangeHeightFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/MyTopViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "MyTopViewController.h" 10 | #import "MyParallaxController.h" 11 | 12 | @interface MyTopViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIImageView * imageView; 15 | 16 | @property (weak, nonatomic) IBOutlet UILabel *label1; 17 | @property (weak, nonatomic) IBOutlet UILabel *label2; 18 | @property (weak, nonatomic) IBOutlet UILabel *label3; 19 | @property (weak, nonatomic) IBOutlet UIImageView *gradientImageView; 20 | 21 | @end 22 | 23 | @implementation MyTopViewController 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | // Custom initialization 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | // Do any additional setup after loading the view. 38 | } 39 | 40 | - (void)didReceiveMemoryWarning 41 | { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | //////////////////////////////////////////////////////////////////////// 47 | #pragma mark - Public 48 | //////////////////////////////////////////////////////////////////////// 49 | 50 | - (void)willChangeHeightFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight { 51 | 52 | M6ParallaxController * parallaxController = [self parallaxController]; 53 | 54 | if (newHeight >= parallaxController.topViewControllerStandartHeight) { 55 | 56 | [self.imageView setAlpha:1]; 57 | [self.label1 setAlpha:1]; 58 | [self.label2 setAlpha:1]; 59 | [self.label3 setAlpha:1]; 60 | 61 | float r = (parallaxController.topViewControllerStandartHeight * 1.25f) / newHeight; 62 | 63 | [self.gradientImageView setAlpha:r*r]; 64 | 65 | } else { 66 | 67 | float r = newHeight / parallaxController.topViewControllerStandartHeight; 68 | [self.imageView setAlpha:r]; 69 | [self.label1 setAlpha:r]; 70 | [self.label2 setAlpha:r*r]; 71 | [self.label3 setAlpha:r*r*r*r]; 72 | [self.gradientImageView setAlpha:r*r*r*r]; 73 | 74 | } 75 | 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/Sample Storyboard-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.peterpaulis.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIMainStoryboardFile 28 | MainStoryboard 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/Sample Storyboard-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Sample Storyboard' target in the 'Sample Storyboard' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_5_0 8 | #warning "This project uses features only available in iOS SDK 5.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/bg.jpg -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/en.lproj/MainStoryboard.storyboard: -------------------------------------------------------------------------------- 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 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 286 | 295 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/gradient-over-image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/gradient-over-image@2x.png -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/gradient_overlay@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample Storyboard/Sample Storyboard/gradient_overlay@2x.png -------------------------------------------------------------------------------- /Sample Storyboard/Sample Storyboard/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Sample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/.DS_Store -------------------------------------------------------------------------------- /Sample/Sample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/.DS_Store -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 7E814DB61710C7BC006242AA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814DB51710C7BC006242AA /* UIKit.framework */; }; 11 | 7E814DB81710C7BC006242AA /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814DB71710C7BC006242AA /* Foundation.framework */; }; 12 | 7E814DBA1710C7BC006242AA /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E814DB91710C7BC006242AA /* CoreGraphics.framework */; }; 13 | 7E814DC01710C7BC006242AA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DBE1710C7BC006242AA /* InfoPlist.strings */; }; 14 | 7E814DC21710C7BC006242AA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DC11710C7BC006242AA /* main.m */; }; 15 | 7E814DC61710C7BC006242AA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DC51710C7BC006242AA /* AppDelegate.m */; }; 16 | 7E814DC81710C7BC006242AA /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DC71710C7BC006242AA /* Default.png */; }; 17 | 7E814DCA1710C7BC006242AA /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DC91710C7BC006242AA /* Default@2x.png */; }; 18 | 7E814DCC1710C7BC006242AA /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DCB1710C7BC006242AA /* Default-568h@2x.png */; }; 19 | 7E814DD91710C7DD006242AA /* bg.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DD81710C7DD006242AA /* bg.jpg */; }; 20 | 7E814DE01710C7FB006242AA /* MyMasterParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DDB1710C7FB006242AA /* MyMasterParallaxController.m */; }; 21 | 7E814DE11710C7FB006242AA /* MyTopViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DDD1710C7FB006242AA /* MyTopViewController.m */; }; 22 | 7E814DE81710C827006242AA /* UIViewController+M6ParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DE71710C827006242AA /* UIViewController+M6ParallaxController.m */; }; 23 | 7E814DE91710C835006242AA /* M6ParallaxController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DE51710C81D006242AA /* M6ParallaxController.m */; }; 24 | 7E814DEB1710C997006242AA /* MyTopViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DEA1710C997006242AA /* MyTopViewController.xib */; }; 25 | 7E814DF11710CC3E006242AA /* MyTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E814DEF1710CC3D006242AA /* MyTableViewController.m */; }; 26 | 7E814DF21710CC3E006242AA /* MyTableViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7E814DF01710CC3E006242AA /* MyTableViewController.xib */; }; 27 | 7ED88354175B7973005DCC81 /* gradient_overlay@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ED88352175B7973005DCC81 /* gradient_overlay@2x.png */; }; 28 | 7ED88355175B7973005DCC81 /* gradient-over-image@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 7ED88353175B7973005DCC81 /* gradient-over-image@2x.png */; }; 29 | /* End PBXBuildFile section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 7E814DB21710C7BC006242AA /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 7E814DB51710C7BC006242AA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 34 | 7E814DB71710C7BC006242AA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 35 | 7E814DB91710C7BC006242AA /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 36 | 7E814DBD1710C7BC006242AA /* Sample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Sample-Info.plist"; sourceTree = ""; }; 37 | 7E814DBF1710C7BC006242AA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 38 | 7E814DC11710C7BC006242AA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 39 | 7E814DC31710C7BC006242AA /* Sample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Sample-Prefix.pch"; sourceTree = ""; }; 40 | 7E814DC41710C7BC006242AA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 7E814DC51710C7BC006242AA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 7E814DC71710C7BC006242AA /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; 43 | 7E814DC91710C7BC006242AA /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; 44 | 7E814DCB1710C7BC006242AA /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; 45 | 7E814DD81710C7DD006242AA /* bg.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = bg.jpg; sourceTree = ""; }; 46 | 7E814DDA1710C7FB006242AA /* MyMasterParallaxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyMasterParallaxController.h; sourceTree = ""; }; 47 | 7E814DDB1710C7FB006242AA /* MyMasterParallaxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyMasterParallaxController.m; sourceTree = ""; }; 48 | 7E814DDC1710C7FB006242AA /* MyTopViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTopViewController.h; sourceTree = ""; }; 49 | 7E814DDD1710C7FB006242AA /* MyTopViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTopViewController.m; sourceTree = ""; }; 50 | 7E814DE41710C81D006242AA /* M6ParallaxController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = M6ParallaxController.h; path = ../../../M6ParallaxController.h; sourceTree = ""; }; 51 | 7E814DE51710C81D006242AA /* M6ParallaxController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = M6ParallaxController.m; path = ../../../M6ParallaxController.m; sourceTree = ""; }; 52 | 7E814DE61710C827006242AA /* UIViewController+M6ParallaxController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+M6ParallaxController.h"; path = "../../../UIViewController+M6ParallaxController.h"; sourceTree = ""; }; 53 | 7E814DE71710C827006242AA /* UIViewController+M6ParallaxController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+M6ParallaxController.m"; path = "../../../UIViewController+M6ParallaxController.m"; sourceTree = ""; }; 54 | 7E814DEA1710C997006242AA /* MyTopViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyTopViewController.xib; sourceTree = ""; }; 55 | 7E814DEE1710CC3D006242AA /* MyTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MyTableViewController.h; sourceTree = ""; }; 56 | 7E814DEF1710CC3D006242AA /* MyTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MyTableViewController.m; sourceTree = ""; }; 57 | 7E814DF01710CC3E006242AA /* MyTableViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MyTableViewController.xib; sourceTree = ""; }; 58 | 7ED88352175B7973005DCC81 /* gradient_overlay@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gradient_overlay@2x.png"; sourceTree = ""; }; 59 | 7ED88353175B7973005DCC81 /* gradient-over-image@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gradient-over-image@2x.png"; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 7E814DAF1710C7BC006242AA /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 7E814DB61710C7BC006242AA /* UIKit.framework in Frameworks */, 68 | 7E814DB81710C7BC006242AA /* Foundation.framework in Frameworks */, 69 | 7E814DBA1710C7BC006242AA /* CoreGraphics.framework in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 7E814DA91710C7BC006242AA = { 77 | isa = PBXGroup; 78 | children = ( 79 | 7E814DBB1710C7BC006242AA /* Sample */, 80 | 7E814DB41710C7BC006242AA /* Frameworks */, 81 | 7E814DB31710C7BC006242AA /* Products */, 82 | ); 83 | sourceTree = ""; 84 | }; 85 | 7E814DB31710C7BC006242AA /* Products */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 7E814DB21710C7BC006242AA /* Sample.app */, 89 | ); 90 | name = Products; 91 | sourceTree = ""; 92 | }; 93 | 7E814DB41710C7BC006242AA /* Frameworks */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | 7E814DB51710C7BC006242AA /* UIKit.framework */, 97 | 7E814DB71710C7BC006242AA /* Foundation.framework */, 98 | 7E814DB91710C7BC006242AA /* CoreGraphics.framework */, 99 | ); 100 | name = Frameworks; 101 | sourceTree = ""; 102 | }; 103 | 7E814DBB1710C7BC006242AA /* Sample */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 7E814DE31710C7FF006242AA /* ParallaxController */, 107 | 7E814DDA1710C7FB006242AA /* MyMasterParallaxController.h */, 108 | 7E814DDB1710C7FB006242AA /* MyMasterParallaxController.m */, 109 | 7E814DDC1710C7FB006242AA /* MyTopViewController.h */, 110 | 7E814DDD1710C7FB006242AA /* MyTopViewController.m */, 111 | 7E814DEA1710C997006242AA /* MyTopViewController.xib */, 112 | 7E814DEE1710CC3D006242AA /* MyTableViewController.h */, 113 | 7E814DEF1710CC3D006242AA /* MyTableViewController.m */, 114 | 7E814DF01710CC3E006242AA /* MyTableViewController.xib */, 115 | 7E814DC41710C7BC006242AA /* AppDelegate.h */, 116 | 7E814DC51710C7BC006242AA /* AppDelegate.m */, 117 | 7E814DD81710C7DD006242AA /* bg.jpg */, 118 | 7E814DBC1710C7BC006242AA /* Supporting Files */, 119 | ); 120 | path = Sample; 121 | sourceTree = ""; 122 | }; 123 | 7E814DBC1710C7BC006242AA /* Supporting Files */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 7ED88352175B7973005DCC81 /* gradient_overlay@2x.png */, 127 | 7ED88353175B7973005DCC81 /* gradient-over-image@2x.png */, 128 | 7E814DBD1710C7BC006242AA /* Sample-Info.plist */, 129 | 7E814DBE1710C7BC006242AA /* InfoPlist.strings */, 130 | 7E814DC11710C7BC006242AA /* main.m */, 131 | 7E814DC31710C7BC006242AA /* Sample-Prefix.pch */, 132 | 7E814DC71710C7BC006242AA /* Default.png */, 133 | 7E814DC91710C7BC006242AA /* Default@2x.png */, 134 | 7E814DCB1710C7BC006242AA /* Default-568h@2x.png */, 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | 7E814DE31710C7FF006242AA /* ParallaxController */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 7E814DE61710C827006242AA /* UIViewController+M6ParallaxController.h */, 143 | 7E814DE71710C827006242AA /* UIViewController+M6ParallaxController.m */, 144 | 7E814DE41710C81D006242AA /* M6ParallaxController.h */, 145 | 7E814DE51710C81D006242AA /* M6ParallaxController.m */, 146 | ); 147 | name = ParallaxController; 148 | sourceTree = ""; 149 | }; 150 | /* End PBXGroup section */ 151 | 152 | /* Begin PBXNativeTarget section */ 153 | 7E814DB11710C7BC006242AA /* Sample */ = { 154 | isa = PBXNativeTarget; 155 | buildConfigurationList = 7E814DD51710C7BC006242AA /* Build configuration list for PBXNativeTarget "Sample" */; 156 | buildPhases = ( 157 | 7E814DAE1710C7BC006242AA /* Sources */, 158 | 7E814DAF1710C7BC006242AA /* Frameworks */, 159 | 7E814DB01710C7BC006242AA /* Resources */, 160 | ); 161 | buildRules = ( 162 | ); 163 | dependencies = ( 164 | ); 165 | name = Sample; 166 | productName = Sample; 167 | productReference = 7E814DB21710C7BC006242AA /* Sample.app */; 168 | productType = "com.apple.product-type.application"; 169 | }; 170 | /* End PBXNativeTarget section */ 171 | 172 | /* Begin PBXProject section */ 173 | 7E814DAA1710C7BC006242AA /* Project object */ = { 174 | isa = PBXProject; 175 | attributes = { 176 | LastUpgradeCheck = 0460; 177 | ORGANIZATIONNAME = "Peter Paulis"; 178 | }; 179 | buildConfigurationList = 7E814DAD1710C7BC006242AA /* Build configuration list for PBXProject "Sample" */; 180 | compatibilityVersion = "Xcode 3.2"; 181 | developmentRegion = English; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | en, 185 | ); 186 | mainGroup = 7E814DA91710C7BC006242AA; 187 | productRefGroup = 7E814DB31710C7BC006242AA /* Products */; 188 | projectDirPath = ""; 189 | projectRoot = ""; 190 | targets = ( 191 | 7E814DB11710C7BC006242AA /* Sample */, 192 | ); 193 | }; 194 | /* End PBXProject section */ 195 | 196 | /* Begin PBXResourcesBuildPhase section */ 197 | 7E814DB01710C7BC006242AA /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | 7E814DC01710C7BC006242AA /* InfoPlist.strings in Resources */, 202 | 7E814DC81710C7BC006242AA /* Default.png in Resources */, 203 | 7E814DCA1710C7BC006242AA /* Default@2x.png in Resources */, 204 | 7E814DCC1710C7BC006242AA /* Default-568h@2x.png in Resources */, 205 | 7E814DD91710C7DD006242AA /* bg.jpg in Resources */, 206 | 7E814DEB1710C997006242AA /* MyTopViewController.xib in Resources */, 207 | 7E814DF21710CC3E006242AA /* MyTableViewController.xib in Resources */, 208 | 7ED88354175B7973005DCC81 /* gradient_overlay@2x.png in Resources */, 209 | 7ED88355175B7973005DCC81 /* gradient-over-image@2x.png in Resources */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | /* End PBXResourcesBuildPhase section */ 214 | 215 | /* Begin PBXSourcesBuildPhase section */ 216 | 7E814DAE1710C7BC006242AA /* Sources */ = { 217 | isa = PBXSourcesBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | 7E814DC21710C7BC006242AA /* main.m in Sources */, 221 | 7E814DC61710C7BC006242AA /* AppDelegate.m in Sources */, 222 | 7E814DE91710C835006242AA /* M6ParallaxController.m in Sources */, 223 | 7E814DE81710C827006242AA /* UIViewController+M6ParallaxController.m in Sources */, 224 | 7E814DE01710C7FB006242AA /* MyMasterParallaxController.m in Sources */, 225 | 7E814DE11710C7FB006242AA /* MyTopViewController.m in Sources */, 226 | 7E814DF11710CC3E006242AA /* MyTableViewController.m in Sources */, 227 | ); 228 | runOnlyForDeploymentPostprocessing = 0; 229 | }; 230 | /* End PBXSourcesBuildPhase section */ 231 | 232 | /* Begin PBXVariantGroup section */ 233 | 7E814DBE1710C7BC006242AA /* InfoPlist.strings */ = { 234 | isa = PBXVariantGroup; 235 | children = ( 236 | 7E814DBF1710C7BC006242AA /* en */, 237 | ); 238 | name = InfoPlist.strings; 239 | sourceTree = ""; 240 | }; 241 | /* End PBXVariantGroup section */ 242 | 243 | /* Begin XCBuildConfiguration section */ 244 | 7E814DD31710C7BC006242AA /* Debug */ = { 245 | isa = XCBuildConfiguration; 246 | buildSettings = { 247 | ALWAYS_SEARCH_USER_PATHS = NO; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_OBJC_ARC = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_EMPTY_BODY = YES; 253 | CLANG_WARN_ENUM_CONVERSION = YES; 254 | CLANG_WARN_INT_CONVERSION = YES; 255 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 256 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 257 | COPY_PHASE_STRIP = NO; 258 | GCC_C_LANGUAGE_STANDARD = gnu99; 259 | GCC_DYNAMIC_NO_PIC = NO; 260 | GCC_OPTIMIZATION_LEVEL = 0; 261 | GCC_PREPROCESSOR_DEFINITIONS = ( 262 | "DEBUG=1", 263 | "$(inherited)", 264 | ); 265 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 266 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 267 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 268 | GCC_WARN_UNUSED_VARIABLE = YES; 269 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 270 | ONLY_ACTIVE_ARCH = YES; 271 | SDKROOT = iphoneos; 272 | }; 273 | name = Debug; 274 | }; 275 | 7E814DD41710C7BC006242AA /* Release */ = { 276 | isa = XCBuildConfiguration; 277 | buildSettings = { 278 | ALWAYS_SEARCH_USER_PATHS = NO; 279 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 280 | CLANG_CXX_LIBRARY = "libc++"; 281 | CLANG_ENABLE_OBJC_ARC = YES; 282 | CLANG_WARN_CONSTANT_CONVERSION = YES; 283 | CLANG_WARN_EMPTY_BODY = YES; 284 | CLANG_WARN_ENUM_CONVERSION = YES; 285 | CLANG_WARN_INT_CONVERSION = YES; 286 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 287 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 288 | COPY_PHASE_STRIP = YES; 289 | GCC_C_LANGUAGE_STANDARD = gnu99; 290 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 291 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 292 | GCC_WARN_UNUSED_VARIABLE = YES; 293 | IPHONEOS_DEPLOYMENT_TARGET = 6.1; 294 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 295 | SDKROOT = iphoneos; 296 | VALIDATE_PRODUCT = YES; 297 | }; 298 | name = Release; 299 | }; 300 | 7E814DD61710C7BC006242AA /* Debug */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 304 | GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch"; 305 | INFOPLIST_FILE = "Sample/Sample-Info.plist"; 306 | PRODUCT_NAME = "$(TARGET_NAME)"; 307 | WRAPPER_EXTENSION = app; 308 | }; 309 | name = Debug; 310 | }; 311 | 7E814DD71710C7BC006242AA /* Release */ = { 312 | isa = XCBuildConfiguration; 313 | buildSettings = { 314 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 315 | GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch"; 316 | INFOPLIST_FILE = "Sample/Sample-Info.plist"; 317 | PRODUCT_NAME = "$(TARGET_NAME)"; 318 | WRAPPER_EXTENSION = app; 319 | }; 320 | name = Release; 321 | }; 322 | /* End XCBuildConfiguration section */ 323 | 324 | /* Begin XCConfigurationList section */ 325 | 7E814DAD1710C7BC006242AA /* Build configuration list for PBXProject "Sample" */ = { 326 | isa = XCConfigurationList; 327 | buildConfigurations = ( 328 | 7E814DD31710C7BC006242AA /* Debug */, 329 | 7E814DD41710C7BC006242AA /* Release */, 330 | ); 331 | defaultConfigurationIsVisible = 0; 332 | defaultConfigurationName = Release; 333 | }; 334 | 7E814DD51710C7BC006242AA /* Build configuration list for PBXNativeTarget "Sample" */ = { 335 | isa = XCConfigurationList; 336 | buildConfigurations = ( 337 | 7E814DD61710C7BC006242AA /* Debug */, 338 | 7E814DD71710C7BC006242AA /* Release */, 339 | ); 340 | defaultConfigurationIsVisible = 0; 341 | defaultConfigurationName = Release; 342 | }; 343 | /* End XCConfigurationList section */ 344 | }; 345 | rootObject = 7E814DAA1710C7BC006242AA /* Project object */; 346 | } 347 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/project.xcworkspace/xcshareddata/Sample.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | AE221A5B-D607-4CCE-881A-D78E65F00729 9 | IDESourceControlProjectName 10 | Sample 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | D3906D66-45A0-4B48-8662-FA733FB46AD7 14 | https://github.com/xelvenone/M6ParallaxController.git 15 | 16 | IDESourceControlProjectPath 17 | Sample/Sample/Sample.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | D3906D66-45A0-4B48-8662-FA733FB46AD7 21 | ../../../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/xelvenone/M6ParallaxController.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | D3906D66-45A0-4B48-8662-FA733FB46AD7 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | D3906D66-45A0-4B48-8662-FA733FB46AD7 36 | IDESourceControlWCCName 37 | M6ParallaxController 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Paulis.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 18 | 19 | 31 | 32 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 24 | 36 | 37 | 38 | 40 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcschemes/Sample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 51 | 52 | 58 | 59 | 60 | 61 | 62 | 63 | 69 | 70 | 76 | 77 | 78 | 79 | 81 | 82 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /Sample/Sample/Sample.xcodeproj/xcuserdata/Paulis.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Sample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 7E814DB11710C7BC006242AA 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "M6ParallaxController.h" 12 | #import "MyMasterParallaxController.h" 13 | 14 | @implementation AppDelegate 15 | 16 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 17 | { 18 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 19 | 20 | // Override point for customization after application launch. 21 | 22 | self.window.rootViewController = [MyMasterParallaxController new]; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application 28 | { 29 | // 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. 30 | // 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. 31 | } 32 | 33 | - (void)applicationDidEnterBackground:(UIApplication *)application 34 | { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | - (void)applicationWillEnterForeground:(UIApplication *)application 40 | { 41 | // 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. 42 | } 43 | 44 | - (void)applicationDidBecomeActive:(UIApplication *)application 45 | { 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 | { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/Default-568h@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Sample/Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/Default.png -------------------------------------------------------------------------------- /Sample/Sample/Sample/Default@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/Default@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyMasterParallaxController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "M6ParallaxController.h" 11 | 12 | @interface MyMasterParallaxController : M6ParallaxController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyMasterParallaxController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "MyMasterParallaxController.h" 10 | #import "MyTopViewController.h" 11 | #import "MyTableViewController.h" 12 | 13 | @interface MyMasterParallaxController () 14 | 15 | @end 16 | 17 | @implementation MyMasterParallaxController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view, typically from a nib. 23 | 24 | [self.view setBackgroundColor:[UIColor whiteColor]]; 25 | 26 | UITapGestureRecognizer * tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:)]; 27 | tapGestureRecognizer.delegate = self; 28 | [self.view addGestureRecognizer:tapGestureRecognizer]; 29 | 30 | } 31 | 32 | - (void)viewDidAppear:(BOOL)animated { 33 | 34 | [super viewDidAppear:animated]; 35 | 36 | static dispatch_once_t once; 37 | dispatch_once(&once, ^{ 38 | // setup 39 | { 40 | UIViewController * topViewController = [MyTopViewController new]; 41 | UITableViewController * tableViewController = [MyTableViewController new]; 42 | 43 | [self setupWithTopViewController:topViewController height:230.f tableViewController:tableViewController]; 44 | 45 | } 46 | }); 47 | 48 | } 49 | 50 | 51 | - (void)handleTapGesture:(id)sender { 52 | 53 | // UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"Yup" message:@"You pressed" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 54 | // [alert show]; 55 | 56 | } 57 | 58 | 59 | - (void)didReceiveMemoryWarning 60 | { 61 | [super didReceiveMemoryWarning]; 62 | // Dispose of any resources that can be recreated. 63 | } 64 | 65 | //////////////////////////////////////////////////////////////////////// 66 | #pragma mark - TapGesture Delegate 67 | //////////////////////////////////////////////////////////////////////// 68 | 69 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch { 70 | 71 | CGPoint tapPoint = [touch locationInView:self.view];; 72 | 73 | if (([self.topViewController.view hitTest:tapPoint withEvent:nil])) { 74 | 75 | MyTopViewController * mtvc = (MyTopViewController *)self.topViewController; 76 | 77 | // check for tap into button 1 78 | tapPoint = [touch locationInView:mtvc.button1]; 79 | if ([mtvc.button1 hitTest:tapPoint withEvent:nil]) { 80 | [mtvc.button1 sendActionsForControlEvents:UIControlEventTouchUpInside]; 81 | return YES; 82 | } 83 | 84 | // check for tap into button 2 85 | tapPoint = [touch locationInView:mtvc.button2]; 86 | if ([mtvc.button2 hitTest:tapPoint withEvent:nil]) { 87 | [mtvc.button2 sendActionsForControlEvents:UIControlEventTouchUpInside]; 88 | return YES; 89 | } 90 | 91 | // check for tap into button 3 92 | tapPoint = [touch locationInView:mtvc.button3]; 93 | if ([mtvc.button3 hitTest:tapPoint withEvent:nil]) { 94 | [mtvc.button3 sendActionsForControlEvents:UIControlEventTouchUpInside]; 95 | return YES; 96 | } 97 | 98 | } 99 | 100 | return NO; 101 | } 102 | 103 | //////////////////////////////////////////////////////////////////////// 104 | #pragma mark - Public 105 | //////////////////////////////////////////////////////////////////////// 106 | 107 | - (void)willChangeHeightOfTopViewControllerFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight { 108 | 109 | MyTopViewController * topViewController = (MyTopViewController *)self.topViewController; 110 | [topViewController willChangeHeightFromHeight:oldHeight toHeight:newHeight]; 111 | 112 | float r = (self.topViewControllerStandartHeight * 1.5f) / newHeight; 113 | [self.tableViewController.view setAlpha:r*r*r*r*r*r]; 114 | 115 | } 116 | 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyTableViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "MyTableViewController.h" 10 | #import "M6ParallaxController.h" 11 | 12 | @interface MyTableViewController () 13 | 14 | @end 15 | 16 | @implementation MyTableViewController 17 | 18 | - (id)initWithStyle:(UITableViewStyle)style 19 | { 20 | self = [super initWithStyle:style]; 21 | if (self) { 22 | // Custom initialization 23 | } 24 | return self; 25 | } 26 | 27 | - (void)viewDidLoad 28 | { 29 | [super viewDidLoad]; 30 | 31 | // Uncomment the following line to preserve selection between presentations. 32 | // self.clearsSelectionOnViewWillAppear = NO; 33 | 34 | // Uncomment the following line to display an Edit button in the navigation bar for this view controller. 35 | // self.navigationItem.rightBarButtonItem = self.editButtonItem; 36 | } 37 | 38 | - (void)didReceiveMemoryWarning 39 | { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | #pragma mark - Table view data source 45 | 46 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 47 | { 48 | return 1; 49 | } 50 | 51 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 52 | { 53 | return 35; 54 | } 55 | 56 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 57 | { 58 | static NSString *CellIdentifier = @"Cell"; 59 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 60 | if (cell == nil) { 61 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; 62 | } 63 | 64 | // Configure the cell... 65 | 66 | UIView * white = [[UIView alloc] initWithFrame:CGRectMake(0, 0, cell.frame.size.width, cell.frame.size.height)]; 67 | [white setBackgroundColor:[UIColor whiteColor]]; 68 | 69 | [cell setBackgroundView:white]; 70 | 71 | [cell.textLabel setText:@"Some text"]; 72 | 73 | return cell; 74 | } 75 | 76 | #pragma mark - Table view delegate 77 | 78 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 79 | 80 | [self.parallaxController tableViewControllerDidScroll:self]; 81 | 82 | } 83 | 84 | @end 85 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTableViewController.xib: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTopViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.h 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MyTopViewController : UIViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UIButton *button1; 14 | @property (weak, nonatomic) IBOutlet UIButton *button2; 15 | @property (weak, nonatomic) IBOutlet UIButton *button3; 16 | 17 | - (void)willChangeHeightFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTopViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MyViewController.m 3 | // Sample Storyboard 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "MyTopViewController.h" 10 | #import "M6ParallaxController.h" 11 | 12 | @interface MyTopViewController () 13 | 14 | @property (weak, nonatomic) IBOutlet UIImageView * imageView; 15 | 16 | @property (weak, nonatomic) IBOutlet UILabel *label1; 17 | @property (weak, nonatomic) IBOutlet UILabel *label2; 18 | @property (weak, nonatomic) IBOutlet UILabel *label3; 19 | @property (weak, nonatomic) IBOutlet UIImageView *gradientImageView; 20 | 21 | @end 22 | 23 | @implementation MyTopViewController 24 | 25 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | // Custom initialization 30 | } 31 | return self; 32 | } 33 | 34 | - (void)viewDidLoad 35 | { 36 | [super viewDidLoad]; 37 | // Do any additional setup after loading the view. 38 | 39 | } 40 | 41 | - (void)didReceiveMemoryWarning 42 | { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | //////////////////////////////////////////////////////////////////////// 48 | #pragma mark - Public 49 | //////////////////////////////////////////////////////////////////////// 50 | 51 | - (void)willChangeHeightFromHeight:(CGFloat)oldHeight toHeight:(CGFloat)newHeight { 52 | 53 | M6ParallaxController * parallaxController = [self parallaxController]; 54 | 55 | if (newHeight >= parallaxController.topViewControllerStandartHeight) { 56 | 57 | [self.imageView setAlpha:1]; 58 | [self.label1 setAlpha:1]; 59 | [self.label2 setAlpha:1]; 60 | [self.label3 setAlpha:1]; 61 | 62 | float r = (parallaxController.topViewControllerStandartHeight * 1.25f) / newHeight; 63 | 64 | [self.gradientImageView setAlpha:r*r]; 65 | 66 | } else { 67 | 68 | float r = newHeight / parallaxController.topViewControllerStandartHeight; 69 | [self.imageView setAlpha:r]; 70 | [self.label1 setAlpha:r]; 71 | [self.label2 setAlpha:r*r]; 72 | [self.label3 setAlpha:r*r*r*r]; 73 | [self.gradientImageView setAlpha:r*r*r*r]; 74 | 75 | } 76 | 77 | } 78 | 79 | //////////////////////////////////////////////////////////////////////// 80 | #pragma mark - Interface 81 | //////////////////////////////////////////////////////////////////////// 82 | 83 | - (IBAction)button1Pressed:(id)sender { 84 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"BUTTON 1" message:@"You pressed button1" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 85 | [alert show]; 86 | } 87 | 88 | - (IBAction)button2Pressed:(id)sender { 89 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"BUTTON 2" message:@"You pressed button2" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 90 | [alert show]; 91 | } 92 | 93 | - (IBAction)button3Pressed:(id)sender { 94 | UIAlertView * alert = [[UIAlertView alloc] initWithTitle:@"BUTTON 3" message:@"You pressed button3" delegate:nil cancelButtonTitle:@"Ok" otherButtonTitles:nil]; 95 | [alert show]; 96 | } 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/MyTopViewController.xib: -------------------------------------------------------------------------------- 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 | 43 | 52 | 61 | 73 | 85 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/Sample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.peterpaulis.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/Sample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Sample' target in the 'Sample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_4_0 8 | #warning "This project uses features only available in iOS SDK 4.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/bg.jpg -------------------------------------------------------------------------------- /Sample/Sample/Sample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample/Sample/Sample/gradient-over-image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/gradient-over-image@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Sample/gradient_overlay@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6ParallaxController/d8b54ca5d2c8efd2da0cf3d76d17317dec7b4f05/Sample/Sample/Sample/gradient_overlay@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Sample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 6.4.2013. 6 | // Copyright (c) 2013 Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /UIViewController+M6ParallaxController.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+M6Parallax.h 3 | // M6ParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class M6ParallaxController; 12 | 13 | @interface UIViewController (M6ParallaxController) 14 | 15 | @property (nonatomic, weak, readonly) M6ParallaxController * parallaxController; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /UIViewController+M6ParallaxController.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+M6Parallax.m 3 | // M6ParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 1.4.2013. 6 | // Copyright (c) 2013 Min60 s.r.o. - http://min60.com. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+M6ParallaxController.h" 10 | 11 | #import "M6ParallaxController.h" 12 | 13 | @implementation UIViewController (M6ParallaxController) 14 | 15 | - (M6ParallaxController *)parallaxController { 16 | UIViewController *iter = self.parentViewController; 17 | while (iter) { 18 | if ([iter isKindOfClass:[M6ParallaxController class]]) { 19 | return (M6ParallaxController *)iter; 20 | } else if (iter.parentViewController && iter.parentViewController != iter) { 21 | iter = iter.parentViewController; 22 | } else { 23 | iter = nil; 24 | } 25 | } 26 | return nil; 27 | } 28 | 29 | @end 30 | --------------------------------------------------------------------------------