├── .DS_Store ├── LICENSE.md ├── M6UniversalParallaxViewController ├── .DS_Store ├── M6TouchForwardView.h ├── M6TouchForwardView.m ├── M6UniversalParallaxViewController.h ├── M6UniversalParallaxViewController.m └── M6UniversalParallaxViewController.xib ├── README.md └── Sample ├── .DS_Store ├── Sample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ ├── Peter.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings │ │ └── admin.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── Peter.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── Sample.xcscheme │ │ └── xcschememanagement.plist │ └── admin.xcuserdatad │ └── xcschemes │ ├── Sample.xcscheme │ └── xcschememanagement.plist └── Sample ├── AppDelegate.h ├── AppDelegate.m ├── FancyViewController.h ├── FancyViewController.m ├── FancyViewController.xib ├── ImageEffects ├── UIImage+ImageEffects.h └── UIImage+ImageEffects.m ├── ImageSampleViewController.h ├── ImageSampleViewController.m ├── ImageSampleViewController.xib ├── Images.xcassets ├── 1.imageset │ ├── 1@2x.png │ └── Contents.json ├── 2.imageset │ ├── 2@2x.png │ └── Contents.json ├── 3.imageset │ ├── 3@2x.png │ └── Contents.json ├── AppIcon.appiconset │ └── Contents.json ├── LaunchImage.launchimage │ └── Contents.json ├── gradient.imageset │ ├── Contents.json │ └── gradient@2x.png ├── pp.imageset │ ├── Contents.json │ └── me@2x.png └── provencale.imageset │ ├── Contents.json │ └── provencale@2x.png ├── MapSampleViewController.h ├── MapSampleViewController.m ├── MapSampleViewController.xib ├── PagerViewController.h ├── PagerViewController.m ├── PagerViewController.xib ├── PickSampleViewController.h ├── PickSampleViewController.m ├── PickSampleViewController.xib ├── Sample-Info.plist ├── Sample-Prefix.pch ├── en.lproj └── InfoPlist.strings └── main.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/.DS_Store -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/M6UniversalParallaxViewController/.DS_Store -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/M6TouchForwardView.h: -------------------------------------------------------------------------------- 1 | // 2 | // TouchForwardView.h 3 | // Streams 4 | // 5 | // Created by Peter Paulis on 05/02/15. 6 | // Copyright (c) 2015 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface M6TouchForwardView : UIView 12 | 13 | @property (nonatomic, weak) IBOutlet UIView * forwardView; 14 | 15 | @end -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/M6TouchForwardView.m: -------------------------------------------------------------------------------- 1 | // 2 | // TouchForwardView.m 3 | // Streams 4 | // 5 | // Created by Peter Paulis on 05/02/15. 6 | // Copyright (c) 2015 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "M6TouchForwardView.h" 10 | 11 | @implementation M6TouchForwardView 12 | 13 | -(id)hitTest:(CGPoint)point withEvent:(UIEvent *)event { 14 | UIView *hitView = [super hitTest:point withEvent:event]; 15 | if (hitView == self) { 16 | return self.forwardView; 17 | } else { 18 | return hitView; 19 | } 20 | } 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/M6UniversalParallaxViewController.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 | 11 | @interface M6UniversalParallaxViewController : UIViewController 12 | 13 | @property (nonatomic, weak) IBOutlet UIView * parallaxContainerView; 14 | @property (nonatomic, weak) IBOutlet UIScrollView * scrollView; 15 | @property (nonatomic, weak) IBOutlet UIView * parallaxView; 16 | 17 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *parallaxContainerViewHeightLayoutConstraint; 18 | 19 | @property (nonatomic, assign) CGFloat minimumHeight; 20 | 21 | // overrride for additional functionality 22 | - (void)parallaxViewContainerHeightWillChange:(CGFloat)newHeight fromOldHeight:(CGFloat)height; 23 | 24 | // no need to set manually, value set by default from NSLayoutConstraint constant 25 | - (void)setParallaxViewContainerRestingHeight:(CGFloat)parallaxViewContainerRestingHeight; 26 | - (CGFloat)parallaxViewContainerRestingHeight; 27 | 28 | @end -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/M6UniversalParallaxViewController.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 "M6UniversalParallaxViewController.h" 10 | 11 | @interface M6UniversalParallaxViewController () 12 | 13 | @property (nonatomic, assign) CGFloat parallaxViewContainerRestingHeight; 14 | 15 | @end 16 | 17 | @implementation M6UniversalParallaxViewController 18 | 19 | @synthesize parallaxViewContainerRestingHeight = _parallaxViewContainerRestingHeight; 20 | 21 | - (void)viewDidLoad 22 | { 23 | [super viewDidLoad]; 24 | 25 | // pramatere control 26 | { 27 | NSAssert(self.parallaxContainerView, @"parallaxContainerView outlet cannot be nil"); 28 | NSAssert(self.scrollView, @"scrollView outlet cannot be nil"); 29 | NSAssert(self.parallaxView, @"parallaxView outlet cannot be nil"); 30 | NSAssert(self.parallaxContainerViewHeightLayoutConstraint, @"parallaxContainerViewHeightLayoutConstraint outlet cannot be nil"); 31 | } 32 | 33 | [self.parallaxContainerView setClipsToBounds:YES]; 34 | 35 | self.scrollView.delegate = self; 36 | 37 | self.parallaxViewContainerRestingHeight = self.parallaxContainerViewHeightLayoutConstraint.constant; 38 | 39 | } 40 | 41 | //////////////////////////////////////////////////////////////////////// 42 | #pragma mark - Override 43 | //////////////////////////////////////////////////////////////////////// 44 | 45 | - (void)parallaxViewContainerHeightWillChange:(CGFloat)newHeight fromOldHeight:(CGFloat)height { 46 | 47 | } 48 | 49 | - (void)setParallaxViewContainerRestingHeight:(CGFloat)parallaxViewContainerRestingHeight { 50 | 51 | _parallaxViewContainerRestingHeight = parallaxViewContainerRestingHeight; 52 | 53 | // adjust for new resting height 54 | [self createTableHeaderView]; 55 | 56 | } 57 | 58 | - (void)setMinimumHeight:(CGFloat)minimumHeight { 59 | 60 | _minimumHeight = minimumHeight; 61 | 62 | self.scrollView.contentInset = UIEdgeInsetsMake(_minimumHeight, 0, 0, 0); 63 | 64 | [self createTableHeaderView]; 65 | 66 | } 67 | 68 | //////////////////////////////////////////////////////////////////////// 69 | #pragma mark - Private 70 | //////////////////////////////////////////////////////////////////////// 71 | 72 | - (void)createTableHeaderView { 73 | 74 | if ([self.scrollView isKindOfClass:[UITableView class]]) { 75 | 76 | UITableView * tv = (UITableView *)self.scrollView; 77 | UIView * hv = [[UIView alloc] initWithFrame:CGRectMake(0, 0, tv.bounds.size.width, self.parallaxViewContainerRestingHeight - self.minimumHeight)]; 78 | tv.tableHeaderView = hv; 79 | } 80 | 81 | } 82 | 83 | //////////////////////////////////////////////////////////////////////// 84 | #pragma mark - UIScrollViewDelegate 85 | //////////////////////////////////////////////////////////////////////// 86 | 87 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 88 | 89 | if (scrollView != self.scrollView) { 90 | return; 91 | } 92 | 93 | CGFloat y = self.scrollView.contentOffset.y + self.parallaxViewContainerRestingHeight; 94 | 95 | if ([self.scrollView isKindOfClass:[UITableView class]]) { 96 | 97 | UITableView * tv = (UITableView *)self.scrollView; 98 | y -= tv.tableHeaderView.frame.size.height;// + self.scrollView.contentInset.top; 99 | 100 | } 101 | 102 | if (y > 0) { 103 | 104 | CGFloat newHeight = MAX(self.minimumHeight, self.parallaxViewContainerRestingHeight - y); 105 | 106 | [self.parallaxContainerView setHidden:(newHeight <= 0)]; 107 | 108 | if (!self.parallaxContainerView.hidden) { 109 | 110 | [self parallaxViewContainerHeightWillChange:newHeight fromOldHeight:self.parallaxContainerViewHeightLayoutConstraint.constant]; 111 | 112 | self.parallaxContainerViewHeightLayoutConstraint.constant = newHeight; 113 | 114 | [self.parallaxContainerView layoutIfNeeded]; 115 | 116 | } 117 | 118 | } else { 119 | 120 | [self.parallaxContainerView setHidden:NO]; 121 | 122 | CGFloat newHeight = MAX(self.minimumHeight, self.parallaxViewContainerRestingHeight - y); 123 | 124 | [self parallaxViewContainerHeightWillChange:newHeight fromOldHeight:self.parallaxContainerViewHeightLayoutConstraint.constant]; 125 | 126 | self.parallaxContainerViewHeightLayoutConstraint.constant = newHeight; 127 | 128 | [self.parallaxContainerView layoutIfNeeded]; 129 | 130 | } 131 | 132 | [self.scrollView setShowsVerticalScrollIndicator:self.parallaxContainerView.hidden]; 133 | 134 | } 135 | 136 | @end 137 | -------------------------------------------------------------------------------- /M6UniversalParallaxViewController/M6UniversalParallaxViewController.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 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | M6UniversalParallaxViewController v.2.0 2 | ================================= 3 | 4 | Easy to setup, lightweight and fully customizable component 5 | 6 | - Supports UITableView 7 | - Autolayout based 8 | - Setup in Interface builder 9 | 10 | #New in version 2.0 11 | 12 | - Fixed behaviour of section headers (no subclassing is now required !!!) 13 | - Added the possiblity to scroll the table over the parallax view 14 | - min height parallax height added 15 | - UIScrollView is not longer supported in favour of UITableView (this was needed to get the section scrolling behaviour right) - if you need a scroll view, consider inserting it as UITableViewCell 16 | 17 | - Added 18 | 19 | Mounting created Bloggif 20 | 21 | #Usage 22 | 23 | ####Subclass your VC 24 |
25 | @interface MyViewController : M6UniversalParallaxViewController
26 | 
27 | 28 | ####Connect the outlets 29 |
30 | @property (nonatomic, weak) IBOutlet UIView * parallaxContainerView;
31 | @property (nonatomic, weak) IBOutlet UIScrollView * scrollView;
32 | @property (nonatomic, weak) IBOutlet UIView * parallaxView;
33 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *parallaxContainerViewHeightLayoutConstraint;
34 | 
35 | 36 | #Notes 37 | 38 | If you want to scroll the table by scrolling the parallax view, subclass the lowest view inside parallax view as M6TouchForwardView and set its forwardView outlet to the table view (this way, by scrolling the parallax view, you are also scrolling the table) 39 | 40 | #Credits 41 | 42 | min:60 - Building your mobile apps - http://min60.com 43 | 44 | #License 45 | 46 | Apache License 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt 47 | 48 | -------------------------------------------------------------------------------- /Sample/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/.DS_Store -------------------------------------------------------------------------------- /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 | 849A958A1A83A83F00984869 /* M6TouchForwardView.m in Sources */ = {isa = PBXBuildFile; fileRef = 849A95891A83A83F00984869 /* M6TouchForwardView.m */; }; 11 | D0B16C3E1995FF0100B278D2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B16C3D1995FF0100B278D2 /* Foundation.framework */; }; 12 | D0B16C401995FF0100B278D2 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B16C3F1995FF0100B278D2 /* CoreGraphics.framework */; }; 13 | D0B16C421995FF0100B278D2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B16C411995FF0100B278D2 /* UIKit.framework */; }; 14 | D0B16C751995FFEB00B278D2 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16C6E1995FFEB00B278D2 /* AppDelegate.m */; }; 15 | D0B16C761995FFEB00B278D2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C6F1995FFEB00B278D2 /* InfoPlist.strings */; }; 16 | D0B16C771995FFEB00B278D2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C711995FFEB00B278D2 /* Images.xcassets */; }; 17 | D0B16C781995FFEB00B278D2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16C721995FFEB00B278D2 /* main.m */; }; 18 | D0B16C791995FFEB00B278D2 /* Sample-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C731995FFEB00B278D2 /* Sample-Info.plist */; }; 19 | D0B16C87199600B700B278D2 /* M6UniversalParallaxViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16C84199600B700B278D2 /* M6UniversalParallaxViewController.m */; }; 20 | D0B16C8A1996011E00B278D2 /* M6UniversalParallaxViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C891996011E00B278D2 /* M6UniversalParallaxViewController.xib */; }; 21 | D0B16C92199609A000B278D2 /* ImageSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16C90199609A000B278D2 /* ImageSampleViewController.m */; }; 22 | D0B16C93199609A000B278D2 /* ImageSampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C91199609A000B278D2 /* ImageSampleViewController.xib */; }; 23 | D0B16C9B1996191300B278D2 /* MapSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16C991996191300B278D2 /* MapSampleViewController.m */; }; 24 | D0B16C9C1996191300B278D2 /* MapSampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16C9A1996191300B278D2 /* MapSampleViewController.xib */; }; 25 | D0B16C9F19961B7700B278D2 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D0B16C9E19961B7700B278D2 /* MapKit.framework */; }; 26 | D0B16CA319961D9000B278D2 /* PickSampleViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16CA119961D9000B278D2 /* PickSampleViewController.m */; }; 27 | D0B16CA419961D9000B278D2 /* PickSampleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16CA219961D9000B278D2 /* PickSampleViewController.xib */; }; 28 | D0B16CA8199621D200B278D2 /* PagerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16CA6199621D200B278D2 /* PagerViewController.m */; }; 29 | D0B16CA9199621D200B278D2 /* PagerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16CA7199621D200B278D2 /* PagerViewController.xib */; }; 30 | D0B16CAE1996290F00B278D2 /* FancyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16CAC1996290F00B278D2 /* FancyViewController.m */; }; 31 | D0B16CAF1996290F00B278D2 /* FancyViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = D0B16CAD1996290F00B278D2 /* FancyViewController.xib */; }; 32 | D0B16CB7199631BB00B278D2 /* UIImage+ImageEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = D0B16CB4199631BB00B278D2 /* UIImage+ImageEffects.m */; }; 33 | /* End PBXBuildFile section */ 34 | 35 | /* Begin PBXFileReference section */ 36 | 849A95881A83A83F00984869 /* M6TouchForwardView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M6TouchForwardView.h; sourceTree = ""; }; 37 | 849A95891A83A83F00984869 /* M6TouchForwardView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M6TouchForwardView.m; sourceTree = ""; }; 38 | D0B16C3A1995FF0100B278D2 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | D0B16C3D1995FF0100B278D2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 40 | D0B16C3F1995FF0100B278D2 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 41 | D0B16C411995FF0100B278D2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 42 | D0B16C561995FF0100B278D2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 43 | D0B16C6D1995FFEB00B278D2 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | D0B16C6E1995FFEB00B278D2 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | D0B16C701995FFEB00B278D2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 46 | D0B16C711995FFEB00B278D2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 47 | D0B16C721995FFEB00B278D2 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 48 | D0B16C731995FFEB00B278D2 /* Sample-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Sample-Info.plist"; sourceTree = ""; }; 49 | D0B16C741995FFEB00B278D2 /* Sample-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Sample-Prefix.pch"; sourceTree = ""; }; 50 | D0B16C83199600B700B278D2 /* M6UniversalParallaxViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M6UniversalParallaxViewController.h; sourceTree = ""; }; 51 | D0B16C84199600B700B278D2 /* M6UniversalParallaxViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = M6UniversalParallaxViewController.m; sourceTree = ""; }; 52 | D0B16C891996011E00B278D2 /* M6UniversalParallaxViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = M6UniversalParallaxViewController.xib; sourceTree = ""; }; 53 | D0B16C8F199609A000B278D2 /* ImageSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageSampleViewController.h; sourceTree = ""; }; 54 | D0B16C90199609A000B278D2 /* ImageSampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageSampleViewController.m; sourceTree = ""; }; 55 | D0B16C91199609A000B278D2 /* ImageSampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ImageSampleViewController.xib; sourceTree = ""; }; 56 | D0B16C981996191300B278D2 /* MapSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MapSampleViewController.h; sourceTree = ""; }; 57 | D0B16C991996191300B278D2 /* MapSampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MapSampleViewController.m; sourceTree = ""; }; 58 | D0B16C9A1996191300B278D2 /* MapSampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MapSampleViewController.xib; sourceTree = ""; }; 59 | D0B16C9E19961B7700B278D2 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 60 | D0B16CA019961D9000B278D2 /* PickSampleViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PickSampleViewController.h; sourceTree = ""; }; 61 | D0B16CA119961D9000B278D2 /* PickSampleViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PickSampleViewController.m; sourceTree = ""; }; 62 | D0B16CA219961D9000B278D2 /* PickSampleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PickSampleViewController.xib; sourceTree = ""; }; 63 | D0B16CA5199621D200B278D2 /* PagerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PagerViewController.h; sourceTree = ""; }; 64 | D0B16CA6199621D200B278D2 /* PagerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PagerViewController.m; sourceTree = ""; }; 65 | D0B16CA7199621D200B278D2 /* PagerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PagerViewController.xib; sourceTree = ""; }; 66 | D0B16CAB1996290F00B278D2 /* FancyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FancyViewController.h; sourceTree = ""; }; 67 | D0B16CAC1996290F00B278D2 /* FancyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FancyViewController.m; sourceTree = ""; }; 68 | D0B16CAD1996290F00B278D2 /* FancyViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FancyViewController.xib; sourceTree = ""; }; 69 | D0B16CB3199631BB00B278D2 /* UIImage+ImageEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImage+ImageEffects.h"; sourceTree = ""; }; 70 | D0B16CB4199631BB00B278D2 /* UIImage+ImageEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImage+ImageEffects.m"; sourceTree = ""; }; 71 | /* End PBXFileReference section */ 72 | 73 | /* Begin PBXFrameworksBuildPhase section */ 74 | D0B16C371995FF0100B278D2 /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | D0B16C9F19961B7700B278D2 /* MapKit.framework in Frameworks */, 79 | D0B16C401995FF0100B278D2 /* CoreGraphics.framework in Frameworks */, 80 | D0B16C421995FF0100B278D2 /* UIKit.framework in Frameworks */, 81 | D0B16C3E1995FF0100B278D2 /* Foundation.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | D0B16C311995FF0100B278D2 = { 89 | isa = PBXGroup; 90 | children = ( 91 | D0B16C6C1995FFEB00B278D2 /* Sample */, 92 | D0B16C3C1995FF0100B278D2 /* Frameworks */, 93 | D0B16C3B1995FF0100B278D2 /* Products */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | D0B16C3B1995FF0100B278D2 /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | D0B16C3A1995FF0100B278D2 /* Sample.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | D0B16C3C1995FF0100B278D2 /* Frameworks */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | D0B16C9E19961B7700B278D2 /* MapKit.framework */, 109 | D0B16C3D1995FF0100B278D2 /* Foundation.framework */, 110 | D0B16C3F1995FF0100B278D2 /* CoreGraphics.framework */, 111 | D0B16C411995FF0100B278D2 /* UIKit.framework */, 112 | D0B16C561995FF0100B278D2 /* XCTest.framework */, 113 | ); 114 | name = Frameworks; 115 | sourceTree = ""; 116 | }; 117 | D0B16C6C1995FFEB00B278D2 /* Sample */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | D0B16C82199600B700B278D2 /* M6UniversalParallaxViewController */, 121 | D0B16C6D1995FFEB00B278D2 /* AppDelegate.h */, 122 | D0B16C6E1995FFEB00B278D2 /* AppDelegate.m */, 123 | D0B16CB119962DAF00B278D2 /* Pick Sample */, 124 | D0B16CB01996291500B278D2 /* Fancy */, 125 | D0B16CAA199621D600B278D2 /* With Pager */, 126 | D0B16C9D1996191800B278D2 /* With Map */, 127 | D0B16C97199618E100B278D2 /* With Image */, 128 | D0B16C7A1996000400B278D2 /* Supporting */, 129 | ); 130 | path = Sample; 131 | sourceTree = ""; 132 | }; 133 | D0B16C7A1996000400B278D2 /* Supporting */ = { 134 | isa = PBXGroup; 135 | children = ( 136 | D0B16C6F1995FFEB00B278D2 /* InfoPlist.strings */, 137 | D0B16C711995FFEB00B278D2 /* Images.xcassets */, 138 | D0B16C721995FFEB00B278D2 /* main.m */, 139 | D0B16C731995FFEB00B278D2 /* Sample-Info.plist */, 140 | D0B16C741995FFEB00B278D2 /* Sample-Prefix.pch */, 141 | ); 142 | name = Supporting; 143 | sourceTree = ""; 144 | }; 145 | D0B16C82199600B700B278D2 /* M6UniversalParallaxViewController */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 849A95881A83A83F00984869 /* M6TouchForwardView.h */, 149 | 849A95891A83A83F00984869 /* M6TouchForwardView.m */, 150 | D0B16C83199600B700B278D2 /* M6UniversalParallaxViewController.h */, 151 | D0B16C84199600B700B278D2 /* M6UniversalParallaxViewController.m */, 152 | D0B16C891996011E00B278D2 /* M6UniversalParallaxViewController.xib */, 153 | ); 154 | name = M6UniversalParallaxViewController; 155 | path = ../../M6UniversalParallaxViewController; 156 | sourceTree = ""; 157 | }; 158 | D0B16C97199618E100B278D2 /* With Image */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | D0B16C8F199609A000B278D2 /* ImageSampleViewController.h */, 162 | D0B16C90199609A000B278D2 /* ImageSampleViewController.m */, 163 | D0B16C91199609A000B278D2 /* ImageSampleViewController.xib */, 164 | ); 165 | name = "With Image"; 166 | sourceTree = ""; 167 | }; 168 | D0B16C9D1996191800B278D2 /* With Map */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | D0B16C981996191300B278D2 /* MapSampleViewController.h */, 172 | D0B16C991996191300B278D2 /* MapSampleViewController.m */, 173 | D0B16C9A1996191300B278D2 /* MapSampleViewController.xib */, 174 | ); 175 | name = "With Map"; 176 | sourceTree = ""; 177 | }; 178 | D0B16CAA199621D600B278D2 /* With Pager */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | D0B16CA5199621D200B278D2 /* PagerViewController.h */, 182 | D0B16CA6199621D200B278D2 /* PagerViewController.m */, 183 | D0B16CA7199621D200B278D2 /* PagerViewController.xib */, 184 | ); 185 | name = "With Pager"; 186 | sourceTree = ""; 187 | }; 188 | D0B16CB01996291500B278D2 /* Fancy */ = { 189 | isa = PBXGroup; 190 | children = ( 191 | D0B16CB2199631BB00B278D2 /* ImageEffects */, 192 | D0B16CAB1996290F00B278D2 /* FancyViewController.h */, 193 | D0B16CAC1996290F00B278D2 /* FancyViewController.m */, 194 | D0B16CAD1996290F00B278D2 /* FancyViewController.xib */, 195 | ); 196 | name = Fancy; 197 | sourceTree = ""; 198 | }; 199 | D0B16CB119962DAF00B278D2 /* Pick Sample */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | D0B16CA019961D9000B278D2 /* PickSampleViewController.h */, 203 | D0B16CA119961D9000B278D2 /* PickSampleViewController.m */, 204 | D0B16CA219961D9000B278D2 /* PickSampleViewController.xib */, 205 | ); 206 | name = "Pick Sample"; 207 | sourceTree = ""; 208 | }; 209 | D0B16CB2199631BB00B278D2 /* ImageEffects */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | D0B16CB3199631BB00B278D2 /* UIImage+ImageEffects.h */, 213 | D0B16CB4199631BB00B278D2 /* UIImage+ImageEffects.m */, 214 | ); 215 | path = ImageEffects; 216 | sourceTree = ""; 217 | }; 218 | /* End PBXGroup section */ 219 | 220 | /* Begin PBXNativeTarget section */ 221 | D0B16C391995FF0100B278D2 /* Sample */ = { 222 | isa = PBXNativeTarget; 223 | buildConfigurationList = D0B16C661995FF0100B278D2 /* Build configuration list for PBXNativeTarget "Sample" */; 224 | buildPhases = ( 225 | D0B16C361995FF0100B278D2 /* Sources */, 226 | D0B16C371995FF0100B278D2 /* Frameworks */, 227 | D0B16C381995FF0100B278D2 /* Resources */, 228 | ); 229 | buildRules = ( 230 | ); 231 | dependencies = ( 232 | ); 233 | name = Sample; 234 | productName = M6UniversalParallaxTableViewController; 235 | productReference = D0B16C3A1995FF0100B278D2 /* Sample.app */; 236 | productType = "com.apple.product-type.application"; 237 | }; 238 | /* End PBXNativeTarget section */ 239 | 240 | /* Begin PBXProject section */ 241 | D0B16C321995FF0100B278D2 /* Project object */ = { 242 | isa = PBXProject; 243 | attributes = { 244 | LastUpgradeCheck = 0510; 245 | ORGANIZATIONNAME = "min60 s.r.o. - Peter Paulis"; 246 | TargetAttributes = { 247 | D0B16C391995FF0100B278D2 = { 248 | DevelopmentTeam = 7BCHU3WQHS; 249 | }; 250 | }; 251 | }; 252 | buildConfigurationList = D0B16C351995FF0100B278D2 /* Build configuration list for PBXProject "Sample" */; 253 | compatibilityVersion = "Xcode 3.2"; 254 | developmentRegion = English; 255 | hasScannedForEncodings = 0; 256 | knownRegions = ( 257 | en, 258 | ); 259 | mainGroup = D0B16C311995FF0100B278D2; 260 | productRefGroup = D0B16C3B1995FF0100B278D2 /* Products */; 261 | projectDirPath = ""; 262 | projectRoot = ""; 263 | targets = ( 264 | D0B16C391995FF0100B278D2 /* Sample */, 265 | ); 266 | }; 267 | /* End PBXProject section */ 268 | 269 | /* Begin PBXResourcesBuildPhase section */ 270 | D0B16C381995FF0100B278D2 /* Resources */ = { 271 | isa = PBXResourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | D0B16C791995FFEB00B278D2 /* Sample-Info.plist in Resources */, 275 | D0B16CA419961D9000B278D2 /* PickSampleViewController.xib in Resources */, 276 | D0B16C8A1996011E00B278D2 /* M6UniversalParallaxViewController.xib in Resources */, 277 | D0B16C761995FFEB00B278D2 /* InfoPlist.strings in Resources */, 278 | D0B16C771995FFEB00B278D2 /* Images.xcassets in Resources */, 279 | D0B16C93199609A000B278D2 /* ImageSampleViewController.xib in Resources */, 280 | D0B16CAF1996290F00B278D2 /* FancyViewController.xib in Resources */, 281 | D0B16CA9199621D200B278D2 /* PagerViewController.xib in Resources */, 282 | D0B16C9C1996191300B278D2 /* MapSampleViewController.xib in Resources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXResourcesBuildPhase section */ 287 | 288 | /* Begin PBXSourcesBuildPhase section */ 289 | D0B16C361995FF0100B278D2 /* Sources */ = { 290 | isa = PBXSourcesBuildPhase; 291 | buildActionMask = 2147483647; 292 | files = ( 293 | D0B16C92199609A000B278D2 /* ImageSampleViewController.m in Sources */, 294 | D0B16C781995FFEB00B278D2 /* main.m in Sources */, 295 | D0B16C9B1996191300B278D2 /* MapSampleViewController.m in Sources */, 296 | D0B16C87199600B700B278D2 /* M6UniversalParallaxViewController.m in Sources */, 297 | D0B16CA319961D9000B278D2 /* PickSampleViewController.m in Sources */, 298 | 849A958A1A83A83F00984869 /* M6TouchForwardView.m in Sources */, 299 | D0B16CB7199631BB00B278D2 /* UIImage+ImageEffects.m in Sources */, 300 | D0B16CAE1996290F00B278D2 /* FancyViewController.m in Sources */, 301 | D0B16CA8199621D200B278D2 /* PagerViewController.m in Sources */, 302 | D0B16C751995FFEB00B278D2 /* AppDelegate.m in Sources */, 303 | ); 304 | runOnlyForDeploymentPostprocessing = 0; 305 | }; 306 | /* End PBXSourcesBuildPhase section */ 307 | 308 | /* Begin PBXVariantGroup section */ 309 | D0B16C6F1995FFEB00B278D2 /* InfoPlist.strings */ = { 310 | isa = PBXVariantGroup; 311 | children = ( 312 | D0B16C701995FFEB00B278D2 /* en */, 313 | ); 314 | name = InfoPlist.strings; 315 | sourceTree = ""; 316 | }; 317 | /* End PBXVariantGroup section */ 318 | 319 | /* Begin XCBuildConfiguration section */ 320 | D0B16C641995FF0100B278D2 /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 325 | CLANG_CXX_LIBRARY = "libc++"; 326 | CLANG_ENABLE_MODULES = YES; 327 | CLANG_ENABLE_OBJC_ARC = YES; 328 | CLANG_WARN_BOOL_CONVERSION = YES; 329 | CLANG_WARN_CONSTANT_CONVERSION = YES; 330 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 331 | CLANG_WARN_EMPTY_BODY = YES; 332 | CLANG_WARN_ENUM_CONVERSION = YES; 333 | CLANG_WARN_INT_CONVERSION = YES; 334 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = NO; 338 | GCC_C_LANGUAGE_STANDARD = gnu99; 339 | GCC_DYNAMIC_NO_PIC = NO; 340 | GCC_OPTIMIZATION_LEVEL = 0; 341 | GCC_PREPROCESSOR_DEFINITIONS = ( 342 | "DEBUG=1", 343 | "$(inherited)", 344 | ); 345 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 346 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 347 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 348 | GCC_WARN_UNDECLARED_SELECTOR = YES; 349 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 350 | GCC_WARN_UNUSED_FUNCTION = YES; 351 | GCC_WARN_UNUSED_VARIABLE = YES; 352 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 353 | ONLY_ACTIVE_ARCH = YES; 354 | SDKROOT = iphoneos; 355 | TARGETED_DEVICE_FAMILY = "1,2"; 356 | }; 357 | name = Debug; 358 | }; 359 | D0B16C651995FF0100B278D2 /* Release */ = { 360 | isa = XCBuildConfiguration; 361 | buildSettings = { 362 | ALWAYS_SEARCH_USER_PATHS = NO; 363 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 364 | CLANG_CXX_LIBRARY = "libc++"; 365 | CLANG_ENABLE_MODULES = YES; 366 | CLANG_ENABLE_OBJC_ARC = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_CONSTANT_CONVERSION = YES; 369 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 370 | CLANG_WARN_EMPTY_BODY = YES; 371 | CLANG_WARN_ENUM_CONVERSION = YES; 372 | CLANG_WARN_INT_CONVERSION = YES; 373 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 374 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 375 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 376 | COPY_PHASE_STRIP = YES; 377 | ENABLE_NS_ASSERTIONS = NO; 378 | GCC_C_LANGUAGE_STANDARD = gnu99; 379 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 380 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 381 | GCC_WARN_UNDECLARED_SELECTOR = YES; 382 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 383 | GCC_WARN_UNUSED_FUNCTION = YES; 384 | GCC_WARN_UNUSED_VARIABLE = YES; 385 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 386 | SDKROOT = iphoneos; 387 | TARGETED_DEVICE_FAMILY = "1,2"; 388 | VALIDATE_PRODUCT = YES; 389 | }; 390 | name = Release; 391 | }; 392 | D0B16C671995FF0100B278D2 /* Debug */ = { 393 | isa = XCBuildConfiguration; 394 | buildSettings = { 395 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 396 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 397 | CODE_SIGN_IDENTITY = "iPhone Developer"; 398 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 399 | GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch"; 400 | INFOPLIST_FILE = "Sample/Sample-Info.plist"; 401 | PRODUCT_NAME = Sample; 402 | WRAPPER_EXTENSION = app; 403 | }; 404 | name = Debug; 405 | }; 406 | D0B16C681995FF0100B278D2 /* Release */ = { 407 | isa = XCBuildConfiguration; 408 | buildSettings = { 409 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 410 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 411 | CODE_SIGN_IDENTITY = "iPhone Developer"; 412 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 413 | GCC_PREFIX_HEADER = "Sample/Sample-Prefix.pch"; 414 | INFOPLIST_FILE = "Sample/Sample-Info.plist"; 415 | PRODUCT_NAME = Sample; 416 | WRAPPER_EXTENSION = app; 417 | }; 418 | name = Release; 419 | }; 420 | /* End XCBuildConfiguration section */ 421 | 422 | /* Begin XCConfigurationList section */ 423 | D0B16C351995FF0100B278D2 /* Build configuration list for PBXProject "Sample" */ = { 424 | isa = XCConfigurationList; 425 | buildConfigurations = ( 426 | D0B16C641995FF0100B278D2 /* Debug */, 427 | D0B16C651995FF0100B278D2 /* Release */, 428 | ); 429 | defaultConfigurationIsVisible = 0; 430 | defaultConfigurationName = Release; 431 | }; 432 | D0B16C661995FF0100B278D2 /* Build configuration list for PBXNativeTarget "Sample" */ = { 433 | isa = XCConfigurationList; 434 | buildConfigurations = ( 435 | D0B16C671995FF0100B278D2 /* Debug */, 436 | D0B16C681995FF0100B278D2 /* Release */, 437 | ); 438 | defaultConfigurationIsVisible = 0; 439 | defaultConfigurationName = Release; 440 | }; 441 | /* End XCConfigurationList section */ 442 | }; 443 | rootObject = D0B16C321995FF0100B278D2 /* Project object */; 444 | } 445 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Peter.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Peter.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/Peter.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/xcuserdata/Peter.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/xcuserdata/Peter.xcuserdatad/xcschemes/Sample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/xcuserdata/Peter.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 | D0B16C391995FF0100B278D2 16 | 17 | primary 18 | 19 | 20 | D0B16C541995FF0100B278D2 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Sample/Sample.xcodeproj/xcuserdata/admin.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.xcodeproj/xcuserdata/admin.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 | D0B16C391995FF0100B278D2 16 | 17 | primary 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /Sample/Sample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // M6UniversalParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - 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/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // M6UniversalParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | #import "PickSampleViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 18 | 19 | PickSampleViewController * psvc = [PickSampleViewController new]; 20 | self.window.rootViewController = [[UINavigationController alloc] initWithRootViewController:psvc]; 21 | 22 | self.window.backgroundColor = [UIColor whiteColor]; 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/FancyViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PagerViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "M6UniversalParallaxViewController.h" 10 | 11 | @interface FancyViewController : M6UniversalParallaxViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | @property (strong, nonatomic) IBOutlet UIView *scrollContentView; 15 | @property (strong, nonatomic) IBOutlet UIScrollView *topParallaxScrollView; 16 | @property (weak, nonatomic) IBOutlet UIPageControl *pageControl; 17 | @property (weak, nonatomic) IBOutlet UIImageView * bluredImageView; 18 | @property (weak, nonatomic) IBOutlet UILabel *secretLabel; 19 | @property (weak, nonatomic) IBOutlet UILabel *captionLabel; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Sample/Sample/FancyViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PagerViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "FancyViewController.h" 10 | 11 | #import "UIImage+ImageEffects.h" 12 | 13 | @interface FancyViewController () 14 | 15 | @end 16 | 17 | @implementation FancyViewController 18 | 19 | - (void)viewDidLoad 20 | { 21 | [super viewDidLoad]; 22 | 23 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; 24 | 25 | [self.topParallaxScrollView addSubview:self.scrollContentView]; 26 | self.topParallaxScrollView.contentSize = self.scrollContentView.frame.size; 27 | 28 | self.bluredImageView.image = [self captureScrollContentViewImageWithBlur]; 29 | 30 | } 31 | 32 | - (UIImage *)captureScrollContentViewImageWithBlur { 33 | 34 | CGFloat previousAlpha = self.parallaxView.alpha; 35 | self.parallaxView.alpha = 1.f; 36 | 37 | CGRect rect = [self.parallaxContainerView bounds]; 38 | if (rect.size.height <= 1) { 39 | return nil; 40 | } 41 | UIGraphicsBeginImageContext(rect.size); 42 | CGContextRef context = UIGraphicsGetCurrentContext(); 43 | [self.parallaxContainerView.layer renderInContext:context]; 44 | UIImage *img = UIGraphicsGetImageFromCurrentImageContext(); 45 | UIGraphicsEndImageContext(); 46 | 47 | self.parallaxView.alpha = previousAlpha; 48 | 49 | return [img applyBlurWithRadius:20 tintColor:nil saturationDeltaFactor:2.f maskImage:nil]; 50 | } 51 | 52 | //////////////////////////////////////////////////////////////////////// 53 | #pragma mark - Overwrite 54 | //////////////////////////////////////////////////////////////////////// 55 | 56 | 57 | - (void)parallaxViewContainerHeightWillChange:(CGFloat)newHeight fromOldHeight:(CGFloat)height { 58 | 59 | self.topParallaxScrollView.contentSize = CGSizeMake(self.scrollContentView.frame.size.width, newHeight); 60 | 61 | CGRect frame = self.scrollContentView.frame; 62 | frame.size.height = newHeight; 63 | self.scrollContentView.frame = frame; 64 | 65 | CGFloat r = MIN(MAX(0.f, (newHeight / 250.f) * (newHeight / 250.f) * (newHeight / 250.f)), 1.f); 66 | self.parallaxView.alpha = r; 67 | 68 | self.bluredImageView.alpha = MIN(MAX(0.f, (newHeight - 270.f) / 50.f ), 1.f); 69 | 70 | self.secretLabel.alpha = self.bluredImageView.alpha; 71 | 72 | } 73 | 74 | //////////////////////////////////////////////////////////////////////// 75 | #pragma mark - ScrollCell delegate 76 | //////////////////////////////////////////////////////////////////////// 77 | 78 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 79 | { 80 | if (scrollView == self.topParallaxScrollView) { 81 | self.pageControl.currentPage = scrollView.contentOffset.x/scrollView.frame.size.width; 82 | 83 | if (self.pageControl.currentPage == 0) { 84 | self.captionLabel.text = @"Castle in France"; 85 | } else if (self.pageControl.currentPage == 1) { 86 | self.captionLabel.text = @"Hospital in Baune"; 87 | } else if (self.pageControl.currentPage == 2) { 88 | self.captionLabel.text = @"Village in countryside"; 89 | } 90 | } 91 | 92 | //!!!!!!!!!!! always call super 93 | [super scrollViewDidScroll:scrollView]; 94 | 95 | } 96 | 97 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { 98 | 99 | if (scrollView == self.topParallaxScrollView) { 100 | self.bluredImageView.image = [self captureScrollContentViewImageWithBlur]; 101 | } 102 | 103 | } 104 | 105 | //////////////////////////////////////////////////////////////////////// 106 | #pragma mark - UITableViewCell delegate 107 | //////////////////////////////////////////////////////////////////////// 108 | 109 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 110 | return 3; 111 | } 112 | 113 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 114 | return 6; 115 | } 116 | 117 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 118 | 119 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])]; 120 | cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", @(indexPath.section), @(indexPath.row)]; 121 | return cell; 122 | } 123 | 124 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 125 | return [NSString stringWithFormat:@"Section %@", @(section)]; 126 | } 127 | 128 | @end 129 | -------------------------------------------------------------------------------- /Sample/Sample/FancyViewController.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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 89 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 167 | 173 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | -------------------------------------------------------------------------------- /Sample/Sample/ImageEffects/UIImage+ImageEffects.h: -------------------------------------------------------------------------------- 1 | /* 2 | File: UIImage+ImageEffects.h 3 | Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. 4 | Version: 1.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | 47 | Copyright © 2013 Apple Inc. All rights reserved. 48 | WWDC 2013 License 49 | 50 | NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 51 | Session. Please refer to the applicable WWDC 2013 Session for further 52 | information. 53 | 54 | IMPORTANT: This Apple software is supplied to you by Apple Inc. 55 | ("Apple") in consideration of your agreement to the following terms, and 56 | your use, installation, modification or redistribution of this Apple 57 | software constitutes acceptance of these terms. If you do not agree with 58 | these terms, please do not use, install, modify or redistribute this 59 | Apple software. 60 | 61 | In consideration of your agreement to abide by the following terms, and 62 | subject to these terms, Apple grants you a non-exclusive license, under 63 | Apple's copyrights in this original Apple software (the "Apple 64 | Software"), to use, reproduce, modify and redistribute the Apple 65 | Software, with or without modifications, in source and/or binary forms; 66 | provided that if you redistribute the Apple Software in its entirety and 67 | without modifications, you must retain this notice and the following 68 | text and disclaimers in all such redistributions of the Apple Software. 69 | Neither the name, trademarks, service marks or logos of Apple Inc. may 70 | be used to endorse or promote products derived from the Apple Software 71 | without specific prior written permission from Apple. Except as 72 | expressly stated in this notice, no other rights or licenses, express or 73 | implied, are granted by Apple herein, including but not limited to any 74 | patent rights that may be infringed by your derivative works or by other 75 | works in which the Apple Software may be incorporated. 76 | 77 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES 78 | NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 79 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR 80 | A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 81 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 82 | 83 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 84 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 86 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 87 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 88 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 89 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 90 | POSSIBILITY OF SUCH DAMAGE. 91 | 92 | EA1002 93 | 5/3/2013 94 | */ 95 | 96 | #import 97 | 98 | @interface UIImage (ImageEffects) 99 | 100 | - (UIImage *)applyLightEffect; 101 | - (UIImage *)applyExtraLightEffect; 102 | - (UIImage *)applyDarkEffect; 103 | - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor; 104 | 105 | - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage; 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /Sample/Sample/ImageEffects/UIImage+ImageEffects.m: -------------------------------------------------------------------------------- 1 | /* 2 | File: UIImage+ImageEffects.m 3 | Abstract: This is a category of UIImage that adds methods to apply blur and tint effects to an image. This is the code you’ll want to look out to find out how to use vImage to efficiently calculate a blur. 4 | Version: 1.0 5 | 6 | Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple 7 | Inc. ("Apple") in consideration of your agreement to the following 8 | terms, and your use, installation, modification or redistribution of 9 | this Apple software constitutes acceptance of these terms. If you do 10 | not agree with these terms, please do not use, install, modify or 11 | redistribute this Apple software. 12 | 13 | In consideration of your agreement to abide by the following terms, and 14 | subject to these terms, Apple grants you a personal, non-exclusive 15 | license, under Apple's copyrights in this original Apple software (the 16 | "Apple Software"), to use, reproduce, modify and redistribute the Apple 17 | Software, with or without modifications, in source and/or binary forms; 18 | provided that if you redistribute the Apple Software in its entirety and 19 | without modifications, you must retain this notice and the following 20 | text and disclaimers in all such redistributions of the Apple Software. 21 | Neither the name, trademarks, service marks or logos of Apple Inc. may 22 | be used to endorse or promote products derived from the Apple Software 23 | without specific prior written permission from Apple. Except as 24 | expressly stated in this notice, no other rights or licenses, express or 25 | implied, are granted by Apple herein, including but not limited to any 26 | patent rights that may be infringed by your derivative works or by other 27 | works in which the Apple Software may be incorporated. 28 | 29 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE 30 | MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION 31 | THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS 32 | FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 33 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 34 | 35 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 36 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 37 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 38 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 39 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 40 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 41 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 42 | POSSIBILITY OF SUCH DAMAGE. 43 | 44 | Copyright (C) 2013 Apple Inc. All Rights Reserved. 45 | 46 | 47 | Copyright © 2013 Apple Inc. All rights reserved. 48 | WWDC 2013 License 49 | 50 | NOTE: This Apple Software was supplied by Apple as part of a WWDC 2013 51 | Session. Please refer to the applicable WWDC 2013 Session for further 52 | information. 53 | 54 | IMPORTANT: This Apple software is supplied to you by Apple Inc. 55 | ("Apple") in consideration of your agreement to the following terms, and 56 | your use, installation, modification or redistribution of this Apple 57 | software constitutes acceptance of these terms. If you do not agree with 58 | these terms, please do not use, install, modify or redistribute this 59 | Apple software. 60 | 61 | In consideration of your agreement to abide by the following terms, and 62 | subject to these terms, Apple grants you a non-exclusive license, under 63 | Apple's copyrights in this original Apple software (the "Apple 64 | Software"), to use, reproduce, modify and redistribute the Apple 65 | Software, with or without modifications, in source and/or binary forms; 66 | provided that if you redistribute the Apple Software in its entirety and 67 | without modifications, you must retain this notice and the following 68 | text and disclaimers in all such redistributions of the Apple Software. 69 | Neither the name, trademarks, service marks or logos of Apple Inc. may 70 | be used to endorse or promote products derived from the Apple Software 71 | without specific prior written permission from Apple. Except as 72 | expressly stated in this notice, no other rights or licenses, express or 73 | implied, are granted by Apple herein, including but not limited to any 74 | patent rights that may be infringed by your derivative works or by other 75 | works in which the Apple Software may be incorporated. 76 | 77 | The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES 78 | NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE 79 | IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR 80 | A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND 81 | OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. 82 | 83 | IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL 84 | OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 85 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 86 | INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, 87 | MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED 88 | AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), 89 | STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE 90 | POSSIBILITY OF SUCH DAMAGE. 91 | 92 | EA1002 93 | 5/3/2013 94 | */ 95 | 96 | #import "UIImage+ImageEffects.h" 97 | 98 | #import 99 | #import 100 | 101 | 102 | @implementation UIImage (ImageEffects) 103 | 104 | 105 | - (UIImage *)applyLightEffect 106 | { 107 | UIColor *tintColor = [UIColor colorWithWhite:1.0 alpha:0.3]; 108 | return [self applyBlurWithRadius:30 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 109 | } 110 | 111 | 112 | - (UIImage *)applyExtraLightEffect 113 | { 114 | UIColor *tintColor = [UIColor colorWithWhite:0.97 alpha:0.82]; 115 | return [self applyBlurWithRadius:20 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 116 | } 117 | 118 | 119 | - (UIImage *)applyDarkEffect 120 | { 121 | UIColor *tintColor = [UIColor colorWithWhite:0.11 alpha:0.73]; 122 | return [self applyBlurWithRadius:20 tintColor:tintColor saturationDeltaFactor:1.8 maskImage:nil]; 123 | } 124 | 125 | 126 | - (UIImage *)applyTintEffectWithColor:(UIColor *)tintColor 127 | { 128 | const CGFloat EffectColorAlpha = 0.6; 129 | UIColor *effectColor = tintColor; 130 | size_t componentCount = CGColorGetNumberOfComponents(tintColor.CGColor); 131 | if(componentCount == 2) { 132 | CGFloat b; 133 | if([tintColor getWhite:&b alpha:NULL]) { 134 | effectColor = [UIColor colorWithWhite:b alpha:EffectColorAlpha]; 135 | } 136 | } 137 | else { 138 | CGFloat r, g, b; 139 | if([tintColor getRed:&r green:&g blue:&b alpha:NULL]) { 140 | effectColor = [UIColor colorWithRed:r green:g blue:b alpha:EffectColorAlpha]; 141 | } 142 | } 143 | return [self applyBlurWithRadius:10 tintColor:effectColor saturationDeltaFactor:-1.0 maskImage:nil]; 144 | } 145 | 146 | 147 | - (UIImage *)applyBlurWithRadius:(CGFloat)blurRadius tintColor:(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage 148 | { 149 | // Check pre-conditions. 150 | if(self.size.width < 1 || self.size.height < 1) { 151 | NSLog (@"*** error: invalid size: (%.2f x %.2f). Both dimensions must be >= 1: %@", self.size.width, self.size.height, self); 152 | return nil; 153 | } 154 | if(!self.CGImage) { 155 | NSLog (@"*** error: image must be backed by a CGImage: %@", self); 156 | return nil; 157 | } 158 | if(maskImage && !maskImage.CGImage) { 159 | NSLog (@"*** error: maskImage must be backed by a CGImage: %@", maskImage); 160 | return nil; 161 | } 162 | 163 | CGRect imageRect = { CGPointZero, self.size }; 164 | UIImage *effectImage = self; 165 | 166 | BOOL hasBlur = blurRadius > __FLT_EPSILON__; 167 | BOOL hasSaturationChange = fabs(saturationDeltaFactor - 1.) > __FLT_EPSILON__; 168 | if(hasBlur || hasSaturationChange) { 169 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 170 | CGContextRef effectInContext = UIGraphicsGetCurrentContext(); 171 | CGContextScaleCTM(effectInContext, 1.0, -1.0); 172 | CGContextTranslateCTM(effectInContext, 0, -self.size.height); 173 | CGContextDrawImage(effectInContext, imageRect, self.CGImage); 174 | 175 | vImage_Buffer effectInBuffer; 176 | effectInBuffer.data = CGBitmapContextGetData(effectInContext); 177 | effectInBuffer.width = CGBitmapContextGetWidth(effectInContext); 178 | effectInBuffer.height = CGBitmapContextGetHeight(effectInContext); 179 | effectInBuffer.rowBytes = CGBitmapContextGetBytesPerRow(effectInContext); 180 | 181 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 182 | CGContextRef effectOutContext = UIGraphicsGetCurrentContext(); 183 | vImage_Buffer effectOutBuffer; 184 | effectOutBuffer.data = CGBitmapContextGetData(effectOutContext); 185 | effectOutBuffer.width = CGBitmapContextGetWidth(effectOutContext); 186 | effectOutBuffer.height = CGBitmapContextGetHeight(effectOutContext); 187 | effectOutBuffer.rowBytes = CGBitmapContextGetBytesPerRow(effectOutContext); 188 | 189 | if(hasBlur) { 190 | // A description of how to compute the box kernel width from the Gaussian 191 | // radius (aka standard deviation) appears in the SVG spec: 192 | // http://www.w3.org/TR/SVG/filters.html#feGaussianBlurElement 193 | // 194 | // For larger values of 's' (s >= 2.0), an approximation can be used: Three 195 | // successive box-blurs build a piece-wise quadratic convolution kernel, which 196 | // approximates the Gaussian kernel to within roughly 3%. 197 | // 198 | // let d = floor(s * 3*sqrt(2*pi)/4 + 0.5) 199 | // 200 | // ... if d is odd, use three box-blurs of size 'd', centered on the output pixel. 201 | // 202 | CGFloat inputRadius = blurRadius * [[UIScreen mainScreen] scale]; 203 | NSUInteger radius = floor(inputRadius * 3. * sqrt(2 * M_PI) / 4 + 0.5); 204 | if(radius % 2 != 1) { 205 | radius += 1; // force radius to be odd so that the three box-blur methodology works. 206 | } 207 | vImageBoxConvolve_ARGB8888(&effectInBuffer, &effectOutBuffer, NULL, 0, 0, (int)radius, (int)radius, 0, kvImageEdgeExtend); 208 | vImageBoxConvolve_ARGB8888(&effectOutBuffer, &effectInBuffer, NULL, 0, 0, (int)radius, (int)radius, 0, kvImageEdgeExtend); 209 | vImageBoxConvolve_ARGB8888(&effectInBuffer, &effectOutBuffer, NULL, 0, 0, (int)radius, (int)radius, 0, kvImageEdgeExtend); 210 | } 211 | BOOL effectImageBuffersAreSwapped = NO; 212 | if(hasSaturationChange) { 213 | CGFloat s = saturationDeltaFactor; 214 | CGFloat floatingPointSaturationMatrix[] = { 215 | 0.0722 + 0.9278 * s, 0.0722 - 0.0722 * s, 0.0722 - 0.0722 * s, 0, 216 | 0.7152 - 0.7152 * s, 0.7152 + 0.2848 * s, 0.7152 - 0.7152 * s, 0, 217 | 0.2126 - 0.2126 * s, 0.2126 - 0.2126 * s, 0.2126 + 0.7873 * s, 0, 218 | 0, 0, 0, 1, 219 | }; 220 | const int32_t divisor = 256; 221 | NSUInteger matrixSize = sizeof(floatingPointSaturationMatrix)/sizeof(floatingPointSaturationMatrix[0]); 222 | int16_t saturationMatrix[matrixSize]; 223 | for (NSUInteger i = 0; i < matrixSize; ++i) { 224 | saturationMatrix[i] = (int16_t)roundf(floatingPointSaturationMatrix[i] * divisor); 225 | } 226 | if(hasBlur) { 227 | vImageMatrixMultiply_ARGB8888(&effectOutBuffer, &effectInBuffer, saturationMatrix, divisor, NULL, NULL, kvImageNoFlags); 228 | effectImageBuffersAreSwapped = YES; 229 | } 230 | else { 231 | vImageMatrixMultiply_ARGB8888(&effectInBuffer, &effectOutBuffer, saturationMatrix, divisor, NULL, NULL, kvImageNoFlags); 232 | } 233 | } 234 | if(!effectImageBuffersAreSwapped) 235 | effectImage = UIGraphicsGetImageFromCurrentImageContext(); 236 | UIGraphicsEndImageContext(); 237 | 238 | if(effectImageBuffersAreSwapped) 239 | effectImage = UIGraphicsGetImageFromCurrentImageContext(); 240 | UIGraphicsEndImageContext(); 241 | } 242 | 243 | // Set up output context. 244 | UIGraphicsBeginImageContextWithOptions(self.size, NO, [[UIScreen mainScreen] scale]); 245 | CGContextRef outputContext = UIGraphicsGetCurrentContext(); 246 | CGContextScaleCTM(outputContext, 1.0, -1.0); 247 | CGContextTranslateCTM(outputContext, 0, -self.size.height); 248 | 249 | // Draw base image. 250 | CGContextDrawImage(outputContext, imageRect, self.CGImage); 251 | 252 | // Draw effect image. 253 | if(hasBlur) { 254 | CGContextSaveGState(outputContext); 255 | if(maskImage) { 256 | CGContextClipToMask(outputContext, imageRect, maskImage.CGImage); 257 | } 258 | CGContextDrawImage(outputContext, imageRect, effectImage.CGImage); 259 | CGContextRestoreGState(outputContext); 260 | } 261 | 262 | // Add in color tint. 263 | if(tintColor) { 264 | CGContextSaveGState(outputContext); 265 | CGContextSetFillColorWithColor(outputContext, tintColor.CGColor); 266 | CGContextFillRect(outputContext, imageRect); 267 | CGContextRestoreGState(outputContext); 268 | } 269 | 270 | // Output image is ready. 271 | UIImage *outputImage = UIGraphicsGetImageFromCurrentImageContext(); 272 | UIGraphicsEndImageContext(); 273 | 274 | return outputImage; 275 | } 276 | 277 | 278 | @end 279 | -------------------------------------------------------------------------------- /Sample/Sample/ImageSampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SampleViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "M6UniversalParallaxViewController.h" 10 | 11 | @interface ImageSampleViewController : M6UniversalParallaxViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | 15 | @end -------------------------------------------------------------------------------- /Sample/Sample/ImageSampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SampleViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "ImageSampleViewController.h" 10 | 11 | @interface ImageSampleViewController () 12 | 13 | @end 14 | 15 | @implementation ImageSampleViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; 22 | 23 | } 24 | 25 | //////////////////////////////////////////////////////////////////////// 26 | #pragma mark - UITableViewCell delegate 27 | //////////////////////////////////////////////////////////////////////// 28 | 29 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 30 | return 3; 31 | } 32 | 33 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 34 | return 6; 35 | } 36 | 37 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 38 | 39 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])]; 40 | cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", @(indexPath.section), @(indexPath.row)]; 41 | return cell; 42 | } 43 | 44 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 45 | return [NSString stringWithFormat:@"Section %@", @(section)]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Sample/Sample/ImageSampleViewController.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 | 35 | 36 | 37 | 38 | 39 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/1.imageset/1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/1.imageset/1@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "1@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/2.imageset/2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/2.imageset/2@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "2@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/3.imageset/3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/3.imageset/3@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "3@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/gradient.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "gradient@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/gradient.imageset/gradient@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/gradient.imageset/gradient@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/pp.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "me@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/pp.imageset/me@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/pp.imageset/me@2x.png -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/provencale.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x", 10 | "filename" : "provencale@2x.png" 11 | } 12 | ], 13 | "info" : { 14 | "version" : 1, 15 | "author" : "xcode" 16 | } 17 | } -------------------------------------------------------------------------------- /Sample/Sample/Images.xcassets/provencale.imageset/provencale@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/peterpaulis/M6UniversalParallaxViewController/d26a30cfb6a31ac26d18c07c7dc4068a28fecae0/Sample/Sample/Images.xcassets/provencale.imageset/provencale@2x.png -------------------------------------------------------------------------------- /Sample/Sample/MapSampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MapSampleViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "M6UniversalParallaxViewController.h" 10 | 11 | @interface MapSampleViewController : M6UniversalParallaxViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /Sample/Sample/MapSampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MapSampleViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "MapSampleViewController.h" 10 | 11 | @interface MapSampleViewController () 12 | 13 | @end 14 | 15 | @implementation MapSampleViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; 22 | 23 | } 24 | 25 | //////////////////////////////////////////////////////////////////////// 26 | #pragma mark - UITableViewCell delegate 27 | //////////////////////////////////////////////////////////////////////// 28 | 29 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 30 | return 3; 31 | } 32 | 33 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 34 | return 6; 35 | } 36 | 37 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 38 | 39 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])]; 40 | cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", @(indexPath.section), @(indexPath.row)]; 41 | return cell; 42 | } 43 | 44 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 45 | return [NSString stringWithFormat:@"Section %@", @(section)]; 46 | } 47 | 48 | @end 49 | -------------------------------------------------------------------------------- /Sample/Sample/MapSampleViewController.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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /Sample/Sample/PagerViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PagerViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "M6UniversalParallaxViewController.h" 10 | 11 | @interface PagerViewController : M6UniversalParallaxViewController 12 | 13 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 14 | @property (strong, nonatomic) IBOutlet UIView *scrollContentView; 15 | @property (strong, nonatomic) IBOutlet UIScrollView *topParallaxScrollView; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /Sample/Sample/PagerViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PagerViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "PagerViewController.h" 10 | 11 | @interface PagerViewController () 12 | 13 | @end 14 | 15 | @implementation PagerViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; 22 | 23 | [self.topParallaxScrollView addSubview:self.scrollContentView]; 24 | self.topParallaxScrollView.contentSize = self.scrollContentView.frame.size; 25 | 26 | } 27 | 28 | - (void)parallaxViewContainerHeightWillChange:(CGFloat)newHeight fromOldHeight:(CGFloat)height { 29 | 30 | self.topParallaxScrollView.contentSize = CGSizeMake(self.scrollContentView.frame.size.width, newHeight); 31 | 32 | CGRect frame = self.scrollContentView.frame; 33 | frame.size.height = newHeight; 34 | self.scrollContentView.frame = frame; 35 | } 36 | 37 | //////////////////////////////////////////////////////////////////////// 38 | #pragma mark - UITableViewCell delegate 39 | //////////////////////////////////////////////////////////////////////// 40 | 41 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 42 | return 3; 43 | } 44 | 45 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 46 | return 6; 47 | } 48 | 49 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 50 | 51 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])]; 52 | cell.textLabel.text = [NSString stringWithFormat:@"%@ %@", @(indexPath.section), @(indexPath.row)]; 53 | return cell; 54 | } 55 | 56 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { 57 | return [NSString stringWithFormat:@"Section %@", @(section)]; 58 | } 59 | 60 | @end 61 | -------------------------------------------------------------------------------- /Sample/Sample/PagerViewController.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 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | -------------------------------------------------------------------------------- /Sample/Sample/PickSampleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PickSampleViewController.h 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface PickSampleViewController : UIViewController 12 | 13 | @end -------------------------------------------------------------------------------- /Sample/Sample/PickSampleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PickSampleViewController.m 3 | // Sample 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - Peter Paulis. All rights reserved. 7 | // 8 | 9 | #import "PickSampleViewController.h" 10 | 11 | #import "MapSampleViewController.h" 12 | #import "ImageSampleViewController.h" 13 | #import "PagerViewController.h" 14 | #import "FancyViewController.h" 15 | 16 | @interface PickSampleViewController () 17 | 18 | @end 19 | 20 | @implementation PickSampleViewController 21 | 22 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 23 | { 24 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 25 | if (self) { 26 | // Custom initialization 27 | } 28 | return self; 29 | } 30 | 31 | - (void)viewDidLoad 32 | { 33 | [super viewDidLoad]; 34 | // Do any additional setup after loading the view from its nib. 35 | 36 | self.navigationItem.title = @"Pick sample"; 37 | 38 | } 39 | 40 | - (void)didReceiveMemoryWarning 41 | { 42 | [super didReceiveMemoryWarning]; 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | //////////////////////////////////////////////////////////////////////// 47 | #pragma mark - 48 | //////////////////////////////////////////////////////////////////////// 49 | 50 | - (IBAction)imageButtonPressed:(id)sender { 51 | 52 | ImageSampleViewController * isvc = [ImageSampleViewController new]; 53 | [self.navigationController pushViewController:isvc animated:YES]; 54 | 55 | } 56 | 57 | - (IBAction)mapButtonPressed:(id)sender { 58 | 59 | MapSampleViewController * msvc = [MapSampleViewController new]; 60 | [self.navigationController pushViewController:msvc animated:YES]; 61 | 62 | } 63 | 64 | - (IBAction)scrollPagingPressed:(id)sender { 65 | 66 | PagerViewController * pvc = [PagerViewController new]; 67 | [self.navigationController pushViewController:pvc animated:YES]; 68 | 69 | } 70 | 71 | - (IBAction)fancyPressed:(id)sender { 72 | 73 | FancyViewController * fvc = [FancyViewController new]; 74 | [self.navigationController pushViewController:fvc animated:YES]; 75 | 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Sample/Sample/PickSampleViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 27 | 36 | 45 | 54 | 59 | 64 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /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.$(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 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /Sample/Sample/Sample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /Sample/Sample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Sample/Sample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // M6UniversalParallaxTableViewController 4 | // 5 | // Created by Peter Paulis on 09/08/14. 6 | // Copyright (c) 2014 min60 s.r.o. - 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 | --------------------------------------------------------------------------------