├── .gitignore ├── LICENSE ├── LRLayerSuperposition ├── LREffectCell.h ├── LREffectCell.m ├── LRLayerSuperposition.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── LRLayerSuperposition │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ ├── 0.imageset │ │ │ ├── 0.jpg │ │ │ └── Contents.json │ │ ├── 1.imageset │ │ │ ├── 2.png │ │ │ └── Contents.json │ │ ├── 2.imageset │ │ │ ├── 4.png │ │ │ └── Contents.json │ │ ├── 3.imageset │ │ │ ├── 5.png │ │ │ └── Contents.json │ │ ├── 4.imageset │ │ │ ├── 6.png │ │ │ └── Contents.json │ │ ├── 5.imageset │ │ │ ├── 8.png │ │ │ └── Contents.json │ │ ├── 6.imageset │ │ │ ├── 7.png │ │ │ └── Contents.json │ │ ├── 7.imageset │ │ │ ├── 9.png │ │ │ └── Contents.json │ │ ├── 8.imageset │ │ │ ├── 10.png │ │ │ └── Contents.json │ │ ├── 9.imageset │ │ │ ├── 3.png │ │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── bak.imageset │ │ │ ├── Contents.json │ │ │ └── bak.jpg │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── UIView+Frame.h │ ├── UIView+Frame.m │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── LRLayerSuperpositionTests │ ├── Info.plist │ └── LRLayerSuperpositionTests.m └── LRLayerSuperpositionUITests │ ├── Info.plist │ └── LRLayerSuperpositionUITests.m ├── README.md └── image.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | # CocoaPods 31 | # 32 | # We recommend against adding the Pods directory to your .gitignore. However 33 | # you should judge for yourself, the pros and cons are mentioned at: 34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 35 | # 36 | # Pods/ 37 | 38 | # Carthage 39 | # 40 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 41 | # Carthage/Checkouts 42 | 43 | Carthage/Build 44 | 45 | # fastlane 46 | # 47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 48 | # screenshots whenever they are needed. 49 | # For more information about the recommended setup visit: 50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | 55 | #Code Injection 56 | # 57 | # After new code Injection tools there's a generated folder /iOSInjectionProject 58 | # https://github.com/johnno1962/injectionforxcode 59 | 60 | iOSInjectionProject/ 61 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 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 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LREffectCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // LREffectCell.h 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/18. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LREffectCell : UITableViewCell 12 | 13 | /** 14 | * 背景图 15 | */ 16 | @property (nonatomic, weak)UIImageView *backGImage; 17 | 18 | /** 19 | * cell偏移设置 20 | */ 21 | - (void)cellOffsetOnTabelView:(UITableView *)tabelView; 22 | 23 | /** 24 | * 创建cell 25 | */ 26 | + (instancetype)cellFromTableView:(UITableView *)tableView; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LREffectCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // LREffectCell.m 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/18. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import "LREffectCell.h" 10 | #import "UIView+Frame.h" 11 | 12 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 13 | 14 | #define LRCellHeight 150 15 | 16 | #define LRLastCellHeight 230 17 | 18 | static NSString * const LRCellId = @"LREffectCellId"; 19 | 20 | @interface LREffectCell () 21 | 22 | @property (nonatomic, weak)UIView *backGView; 23 | 24 | @end 25 | 26 | @implementation LREffectCell 27 | 28 | 29 | - (UIView *)backGView { 30 | 31 | if (!_backGView) { 32 | UIView *view = [UIView new]; 33 | view.clipsToBounds = YES; 34 | [self.contentView addSubview:view]; 35 | _backGView = view; 36 | } 37 | return _backGView; 38 | } 39 | 40 | - (UIImageView *)backGImage { 41 | 42 | if (!_backGImage) { 43 | UIImageView *imageView = [UIImageView new]; 44 | imageView.contentMode = UIViewContentModeScaleAspectFill; 45 | [self.backGView addSubview:imageView]; 46 | _backGImage = imageView; 47 | 48 | } 49 | return _backGImage; 50 | } 51 | 52 | 53 | + (instancetype)cellFromTableView:(UITableView *)tableView 54 | { 55 | 56 | LREffectCell *cell = [tableView dequeueReusableCellWithIdentifier:LRCellId]; 57 | 58 | if (!cell) { 59 | 60 | cell = [[LREffectCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:LRCellId]; 61 | } 62 | 63 | return cell; 64 | } 65 | 66 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier 67 | { 68 | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; 69 | if (self) { 70 | 71 | self.selectionStyle = UITableViewCellSeparatorStyleNone; 72 | 73 | //content and subviews are clipped to the bounds of the view 74 | self.clipsToBounds = NO; 75 | self.backGView.frame = CGRectMake(0, 0, SCREEN_WIDTH, LRCellHeight); 76 | self.backGImage.frame = CGRectMake(0, 0, SCREEN_WIDTH, LRLastCellHeight); 77 | } 78 | return self; 79 | } 80 | 81 | 82 | 83 | - (void)cellOffsetOnTabelView:(UITableView *)tabelView 84 | { 85 | 86 | CGFloat currentLocation = tabelView.contentOffset.y + LRLastCellHeight; 87 | 88 | #if 0 89 | //下拉禁止 第一个cell往下移动 90 | if (currentLocation < LRCellHeight) return; 91 | #endif 92 | 93 | //如果超出规定的位置以 ->“上” 94 | if (self.frame.origin.y < tabelView.contentOffset.y + LRLastCellHeight - LRCellHeight) { 95 | 96 | self.backGView.height = LRLastCellHeight; 97 | 98 | self.backGView.y = - (LRLastCellHeight - LRCellHeight); 99 | 100 | 101 | }else if (self.frame.origin.y <= currentLocation && self.frame.origin.y >= tabelView.contentOffset.y) {//cell开始进入规定的位置 102 | 103 | //通过绝对值 取出移动的Y值 104 | CGFloat moveY = ABS(self.frame.origin.y - currentLocation) / LRCellHeight * (LRLastCellHeight - LRCellHeight); 105 | 106 | //每次进来把当前cell提到最上层 107 | [self.superview bringSubviewToFront:self]; 108 | 109 | //移动的值 + cell固定高度 110 | self.backGView.height = LRCellHeight + moveY; 111 | 112 | //设置偏移量Y值 113 | self.backGView.y = - moveY; 114 | 115 | }else{//超出规定的位置以 ->“下” 116 | 117 | self.backGView.height = LRCellHeight; 118 | 119 | self.backGView.y = 0; 120 | } 121 | } 122 | 123 | @end 124 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 81B7838A1D3D084900240D7D /* LREffectCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 81B783891D3D084900240D7D /* LREffectCell.m */; }; 11 | 81D4B05E1D3BA06B005A3952 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B05D1D3BA06B005A3952 /* main.m */; }; 12 | 81D4B0611D3BA06B005A3952 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B0601D3BA06B005A3952 /* AppDelegate.m */; }; 13 | 81D4B0641D3BA06B005A3952 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B0631D3BA06B005A3952 /* ViewController.m */; }; 14 | 81D4B0671D3BA06B005A3952 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81D4B0651D3BA06B005A3952 /* Main.storyboard */; }; 15 | 81D4B0691D3BA06B005A3952 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81D4B0681D3BA06B005A3952 /* Assets.xcassets */; }; 16 | 81D4B06C1D3BA06B005A3952 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81D4B06A1D3BA06B005A3952 /* LaunchScreen.storyboard */; }; 17 | 81D4B0771D3BA06B005A3952 /* LRLayerSuperpositionTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B0761D3BA06B005A3952 /* LRLayerSuperpositionTests.m */; }; 18 | 81D4B0821D3BA06B005A3952 /* LRLayerSuperpositionUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B0811D3BA06B005A3952 /* LRLayerSuperpositionUITests.m */; }; 19 | 81D4B0961D3BA233005A3952 /* UIView+Frame.m in Sources */ = {isa = PBXBuildFile; fileRef = 81D4B0951D3BA233005A3952 /* UIView+Frame.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 81D4B0731D3BA06B005A3952 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 81D4B0511D3BA06A005A3952 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 81D4B0581D3BA06B005A3952; 28 | remoteInfo = LRLayerSuperposition; 29 | }; 30 | 81D4B07E1D3BA06B005A3952 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 81D4B0511D3BA06A005A3952 /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 81D4B0581D3BA06B005A3952; 35 | remoteInfo = LRLayerSuperposition; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 81B783881D3D084900240D7D /* LREffectCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LREffectCell.h; path = ../LREffectCell.h; sourceTree = ""; }; 41 | 81B783891D3D084900240D7D /* LREffectCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LREffectCell.m; path = ../LREffectCell.m; sourceTree = ""; }; 42 | 81D4B0591D3BA06B005A3952 /* LRLayerSuperposition.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LRLayerSuperposition.app; sourceTree = BUILT_PRODUCTS_DIR; }; 43 | 81D4B05D1D3BA06B005A3952 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 44 | 81D4B05F1D3BA06B005A3952 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 45 | 81D4B0601D3BA06B005A3952 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 46 | 81D4B0621D3BA06B005A3952 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 47 | 81D4B0631D3BA06B005A3952 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 48 | 81D4B0661D3BA06B005A3952 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 49 | 81D4B0681D3BA06B005A3952 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 50 | 81D4B06B1D3BA06B005A3952 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 51 | 81D4B06D1D3BA06B005A3952 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 81D4B0721D3BA06B005A3952 /* LRLayerSuperpositionTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LRLayerSuperpositionTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 81D4B0761D3BA06B005A3952 /* LRLayerSuperpositionTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LRLayerSuperpositionTests.m; sourceTree = ""; }; 54 | 81D4B0781D3BA06B005A3952 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 81D4B07D1D3BA06B005A3952 /* LRLayerSuperpositionUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LRLayerSuperpositionUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 81D4B0811D3BA06B005A3952 /* LRLayerSuperpositionUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LRLayerSuperpositionUITests.m; sourceTree = ""; }; 57 | 81D4B0831D3BA06B005A3952 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 81D4B0941D3BA233005A3952 /* UIView+Frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Frame.h"; sourceTree = ""; }; 59 | 81D4B0951D3BA233005A3952 /* UIView+Frame.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Frame.m"; sourceTree = ""; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 81D4B0561D3BA06B005A3952 /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | 81D4B06F1D3BA06B005A3952 /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | ); 75 | runOnlyForDeploymentPostprocessing = 0; 76 | }; 77 | 81D4B07A1D3BA06B005A3952 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXFrameworksBuildPhase section */ 85 | 86 | /* Begin PBXGroup section */ 87 | 81D4B0501D3BA06A005A3952 = { 88 | isa = PBXGroup; 89 | children = ( 90 | 81D4B05B1D3BA06B005A3952 /* LRLayerSuperposition */, 91 | 81D4B0751D3BA06B005A3952 /* LRLayerSuperpositionTests */, 92 | 81D4B0801D3BA06B005A3952 /* LRLayerSuperpositionUITests */, 93 | 81D4B05A1D3BA06B005A3952 /* Products */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 81D4B05A1D3BA06B005A3952 /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 81D4B0591D3BA06B005A3952 /* LRLayerSuperposition.app */, 101 | 81D4B0721D3BA06B005A3952 /* LRLayerSuperpositionTests.xctest */, 102 | 81D4B07D1D3BA06B005A3952 /* LRLayerSuperpositionUITests.xctest */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 81D4B05B1D3BA06B005A3952 /* LRLayerSuperposition */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 81D4B05F1D3BA06B005A3952 /* AppDelegate.h */, 111 | 81D4B0601D3BA06B005A3952 /* AppDelegate.m */, 112 | 81D4B0621D3BA06B005A3952 /* ViewController.h */, 113 | 81D4B0631D3BA06B005A3952 /* ViewController.m */, 114 | 81B783881D3D084900240D7D /* LREffectCell.h */, 115 | 81B783891D3D084900240D7D /* LREffectCell.m */, 116 | 81D4B0941D3BA233005A3952 /* UIView+Frame.h */, 117 | 81D4B0951D3BA233005A3952 /* UIView+Frame.m */, 118 | 81D4B0651D3BA06B005A3952 /* Main.storyboard */, 119 | 81D4B0681D3BA06B005A3952 /* Assets.xcassets */, 120 | 81D4B06A1D3BA06B005A3952 /* LaunchScreen.storyboard */, 121 | 81D4B06D1D3BA06B005A3952 /* Info.plist */, 122 | 81D4B05C1D3BA06B005A3952 /* Supporting Files */, 123 | ); 124 | path = LRLayerSuperposition; 125 | sourceTree = ""; 126 | }; 127 | 81D4B05C1D3BA06B005A3952 /* Supporting Files */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 81D4B05D1D3BA06B005A3952 /* main.m */, 131 | ); 132 | name = "Supporting Files"; 133 | sourceTree = ""; 134 | }; 135 | 81D4B0751D3BA06B005A3952 /* LRLayerSuperpositionTests */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 81D4B0761D3BA06B005A3952 /* LRLayerSuperpositionTests.m */, 139 | 81D4B0781D3BA06B005A3952 /* Info.plist */, 140 | ); 141 | path = LRLayerSuperpositionTests; 142 | sourceTree = ""; 143 | }; 144 | 81D4B0801D3BA06B005A3952 /* LRLayerSuperpositionUITests */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 81D4B0811D3BA06B005A3952 /* LRLayerSuperpositionUITests.m */, 148 | 81D4B0831D3BA06B005A3952 /* Info.plist */, 149 | ); 150 | path = LRLayerSuperpositionUITests; 151 | sourceTree = ""; 152 | }; 153 | /* End PBXGroup section */ 154 | 155 | /* Begin PBXNativeTarget section */ 156 | 81D4B0581D3BA06B005A3952 /* LRLayerSuperposition */ = { 157 | isa = PBXNativeTarget; 158 | buildConfigurationList = 81D4B0861D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperposition" */; 159 | buildPhases = ( 160 | 81D4B0551D3BA06B005A3952 /* Sources */, 161 | 81D4B0561D3BA06B005A3952 /* Frameworks */, 162 | 81D4B0571D3BA06B005A3952 /* Resources */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = LRLayerSuperposition; 169 | productName = LRLayerSuperposition; 170 | productReference = 81D4B0591D3BA06B005A3952 /* LRLayerSuperposition.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | 81D4B0711D3BA06B005A3952 /* LRLayerSuperpositionTests */ = { 174 | isa = PBXNativeTarget; 175 | buildConfigurationList = 81D4B0891D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperpositionTests" */; 176 | buildPhases = ( 177 | 81D4B06E1D3BA06B005A3952 /* Sources */, 178 | 81D4B06F1D3BA06B005A3952 /* Frameworks */, 179 | 81D4B0701D3BA06B005A3952 /* Resources */, 180 | ); 181 | buildRules = ( 182 | ); 183 | dependencies = ( 184 | 81D4B0741D3BA06B005A3952 /* PBXTargetDependency */, 185 | ); 186 | name = LRLayerSuperpositionTests; 187 | productName = LRLayerSuperpositionTests; 188 | productReference = 81D4B0721D3BA06B005A3952 /* LRLayerSuperpositionTests.xctest */; 189 | productType = "com.apple.product-type.bundle.unit-test"; 190 | }; 191 | 81D4B07C1D3BA06B005A3952 /* LRLayerSuperpositionUITests */ = { 192 | isa = PBXNativeTarget; 193 | buildConfigurationList = 81D4B08C1D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperpositionUITests" */; 194 | buildPhases = ( 195 | 81D4B0791D3BA06B005A3952 /* Sources */, 196 | 81D4B07A1D3BA06B005A3952 /* Frameworks */, 197 | 81D4B07B1D3BA06B005A3952 /* Resources */, 198 | ); 199 | buildRules = ( 200 | ); 201 | dependencies = ( 202 | 81D4B07F1D3BA06B005A3952 /* PBXTargetDependency */, 203 | ); 204 | name = LRLayerSuperpositionUITests; 205 | productName = LRLayerSuperpositionUITests; 206 | productReference = 81D4B07D1D3BA06B005A3952 /* LRLayerSuperpositionUITests.xctest */; 207 | productType = "com.apple.product-type.bundle.ui-testing"; 208 | }; 209 | /* End PBXNativeTarget section */ 210 | 211 | /* Begin PBXProject section */ 212 | 81D4B0511D3BA06A005A3952 /* Project object */ = { 213 | isa = PBXProject; 214 | attributes = { 215 | LastUpgradeCheck = 0710; 216 | ORGANIZATIONNAME = scorpio; 217 | TargetAttributes = { 218 | 81D4B0581D3BA06B005A3952 = { 219 | CreatedOnToolsVersion = 7.1.1; 220 | }; 221 | 81D4B0711D3BA06B005A3952 = { 222 | CreatedOnToolsVersion = 7.1.1; 223 | TestTargetID = 81D4B0581D3BA06B005A3952; 224 | }; 225 | 81D4B07C1D3BA06B005A3952 = { 226 | CreatedOnToolsVersion = 7.1.1; 227 | TestTargetID = 81D4B0581D3BA06B005A3952; 228 | }; 229 | }; 230 | }; 231 | buildConfigurationList = 81D4B0541D3BA06A005A3952 /* Build configuration list for PBXProject "LRLayerSuperposition" */; 232 | compatibilityVersion = "Xcode 3.2"; 233 | developmentRegion = English; 234 | hasScannedForEncodings = 0; 235 | knownRegions = ( 236 | en, 237 | Base, 238 | ); 239 | mainGroup = 81D4B0501D3BA06A005A3952; 240 | productRefGroup = 81D4B05A1D3BA06B005A3952 /* Products */; 241 | projectDirPath = ""; 242 | projectRoot = ""; 243 | targets = ( 244 | 81D4B0581D3BA06B005A3952 /* LRLayerSuperposition */, 245 | 81D4B0711D3BA06B005A3952 /* LRLayerSuperpositionTests */, 246 | 81D4B07C1D3BA06B005A3952 /* LRLayerSuperpositionUITests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXResourcesBuildPhase section */ 252 | 81D4B0571D3BA06B005A3952 /* Resources */ = { 253 | isa = PBXResourcesBuildPhase; 254 | buildActionMask = 2147483647; 255 | files = ( 256 | 81D4B06C1D3BA06B005A3952 /* LaunchScreen.storyboard in Resources */, 257 | 81D4B0691D3BA06B005A3952 /* Assets.xcassets in Resources */, 258 | 81D4B0671D3BA06B005A3952 /* Main.storyboard in Resources */, 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | }; 262 | 81D4B0701D3BA06B005A3952 /* Resources */ = { 263 | isa = PBXResourcesBuildPhase; 264 | buildActionMask = 2147483647; 265 | files = ( 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | }; 269 | 81D4B07B1D3BA06B005A3952 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXResourcesBuildPhase section */ 277 | 278 | /* Begin PBXSourcesBuildPhase section */ 279 | 81D4B0551D3BA06B005A3952 /* Sources */ = { 280 | isa = PBXSourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 81D4B0641D3BA06B005A3952 /* ViewController.m in Sources */, 284 | 81D4B0611D3BA06B005A3952 /* AppDelegate.m in Sources */, 285 | 81B7838A1D3D084900240D7D /* LREffectCell.m in Sources */, 286 | 81D4B0961D3BA233005A3952 /* UIView+Frame.m in Sources */, 287 | 81D4B05E1D3BA06B005A3952 /* main.m in Sources */, 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | }; 291 | 81D4B06E1D3BA06B005A3952 /* Sources */ = { 292 | isa = PBXSourcesBuildPhase; 293 | buildActionMask = 2147483647; 294 | files = ( 295 | 81D4B0771D3BA06B005A3952 /* LRLayerSuperpositionTests.m in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 81D4B0791D3BA06B005A3952 /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 81D4B0821D3BA06B005A3952 /* LRLayerSuperpositionUITests.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXTargetDependency section */ 310 | 81D4B0741D3BA06B005A3952 /* PBXTargetDependency */ = { 311 | isa = PBXTargetDependency; 312 | target = 81D4B0581D3BA06B005A3952 /* LRLayerSuperposition */; 313 | targetProxy = 81D4B0731D3BA06B005A3952 /* PBXContainerItemProxy */; 314 | }; 315 | 81D4B07F1D3BA06B005A3952 /* PBXTargetDependency */ = { 316 | isa = PBXTargetDependency; 317 | target = 81D4B0581D3BA06B005A3952 /* LRLayerSuperposition */; 318 | targetProxy = 81D4B07E1D3BA06B005A3952 /* PBXContainerItemProxy */; 319 | }; 320 | /* End PBXTargetDependency section */ 321 | 322 | /* Begin PBXVariantGroup section */ 323 | 81D4B0651D3BA06B005A3952 /* Main.storyboard */ = { 324 | isa = PBXVariantGroup; 325 | children = ( 326 | 81D4B0661D3BA06B005A3952 /* Base */, 327 | ); 328 | name = Main.storyboard; 329 | sourceTree = ""; 330 | }; 331 | 81D4B06A1D3BA06B005A3952 /* LaunchScreen.storyboard */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | 81D4B06B1D3BA06B005A3952 /* Base */, 335 | ); 336 | name = LaunchScreen.storyboard; 337 | sourceTree = ""; 338 | }; 339 | /* End PBXVariantGroup section */ 340 | 341 | /* Begin XCBuildConfiguration section */ 342 | 81D4B0841D3BA06B005A3952 /* Debug */ = { 343 | isa = XCBuildConfiguration; 344 | buildSettings = { 345 | ALWAYS_SEARCH_USER_PATHS = NO; 346 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 347 | CLANG_CXX_LIBRARY = "libc++"; 348 | CLANG_ENABLE_MODULES = YES; 349 | CLANG_ENABLE_OBJC_ARC = YES; 350 | CLANG_WARN_BOOL_CONVERSION = YES; 351 | CLANG_WARN_CONSTANT_CONVERSION = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INT_CONVERSION = YES; 356 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 357 | CLANG_WARN_UNREACHABLE_CODE = YES; 358 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 359 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 360 | COPY_PHASE_STRIP = NO; 361 | DEBUG_INFORMATION_FORMAT = dwarf; 362 | ENABLE_STRICT_OBJC_MSGSEND = YES; 363 | ENABLE_TESTABILITY = YES; 364 | GCC_C_LANGUAGE_STANDARD = gnu99; 365 | GCC_DYNAMIC_NO_PIC = NO; 366 | GCC_NO_COMMON_BLOCKS = YES; 367 | GCC_OPTIMIZATION_LEVEL = 0; 368 | GCC_PREPROCESSOR_DEFINITIONS = ( 369 | "DEBUG=1", 370 | "$(inherited)", 371 | ); 372 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 373 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 374 | GCC_WARN_UNDECLARED_SELECTOR = YES; 375 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 376 | GCC_WARN_UNUSED_FUNCTION = YES; 377 | GCC_WARN_UNUSED_VARIABLE = YES; 378 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 379 | MTL_ENABLE_DEBUG_INFO = YES; 380 | ONLY_ACTIVE_ARCH = YES; 381 | SDKROOT = iphoneos; 382 | }; 383 | name = Debug; 384 | }; 385 | 81D4B0851D3BA06B005A3952 /* Release */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | ALWAYS_SEARCH_USER_PATHS = NO; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_WARN_BOOL_CONVERSION = YES; 394 | CLANG_WARN_CONSTANT_CONVERSION = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_EMPTY_BODY = YES; 397 | CLANG_WARN_ENUM_CONVERSION = YES; 398 | CLANG_WARN_INT_CONVERSION = YES; 399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 403 | COPY_PHASE_STRIP = NO; 404 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 405 | ENABLE_NS_ASSERTIONS = NO; 406 | ENABLE_STRICT_OBJC_MSGSEND = YES; 407 | GCC_C_LANGUAGE_STANDARD = gnu99; 408 | GCC_NO_COMMON_BLOCKS = YES; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 416 | MTL_ENABLE_DEBUG_INFO = NO; 417 | SDKROOT = iphoneos; 418 | VALIDATE_PRODUCT = YES; 419 | }; 420 | name = Release; 421 | }; 422 | 81D4B0871D3BA06B005A3952 /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 426 | INFOPLIST_FILE = LRLayerSuperposition/Info.plist; 427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 428 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperposition; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | }; 431 | name = Debug; 432 | }; 433 | 81D4B0881D3BA06B005A3952 /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | INFOPLIST_FILE = LRLayerSuperposition/Info.plist; 438 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 439 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperposition; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | }; 442 | name = Release; 443 | }; 444 | 81D4B08A1D3BA06B005A3952 /* Debug */ = { 445 | isa = XCBuildConfiguration; 446 | buildSettings = { 447 | BUNDLE_LOADER = "$(TEST_HOST)"; 448 | INFOPLIST_FILE = LRLayerSuperpositionTests/Info.plist; 449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 450 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperpositionTests; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LRLayerSuperposition.app/LRLayerSuperposition"; 453 | }; 454 | name = Debug; 455 | }; 456 | 81D4B08B1D3BA06B005A3952 /* Release */ = { 457 | isa = XCBuildConfiguration; 458 | buildSettings = { 459 | BUNDLE_LOADER = "$(TEST_HOST)"; 460 | INFOPLIST_FILE = LRLayerSuperpositionTests/Info.plist; 461 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 462 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperpositionTests; 463 | PRODUCT_NAME = "$(TARGET_NAME)"; 464 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LRLayerSuperposition.app/LRLayerSuperposition"; 465 | }; 466 | name = Release; 467 | }; 468 | 81D4B08D1D3BA06B005A3952 /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | INFOPLIST_FILE = LRLayerSuperpositionUITests/Info.plist; 472 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 473 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperpositionUITests; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | TEST_TARGET_NAME = LRLayerSuperposition; 476 | USES_XCTRUNNER = YES; 477 | }; 478 | name = Debug; 479 | }; 480 | 81D4B08E1D3BA06B005A3952 /* Release */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | INFOPLIST_FILE = LRLayerSuperpositionUITests/Info.plist; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 485 | PRODUCT_BUNDLE_IDENTIFIER = cn.lr.LRLayerSuperpositionUITests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | TEST_TARGET_NAME = LRLayerSuperposition; 488 | USES_XCTRUNNER = YES; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 81D4B0541D3BA06A005A3952 /* Build configuration list for PBXProject "LRLayerSuperposition" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 81D4B0841D3BA06B005A3952 /* Debug */, 499 | 81D4B0851D3BA06B005A3952 /* Release */, 500 | ); 501 | defaultConfigurationIsVisible = 0; 502 | defaultConfigurationName = Release; 503 | }; 504 | 81D4B0861D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperposition" */ = { 505 | isa = XCConfigurationList; 506 | buildConfigurations = ( 507 | 81D4B0871D3BA06B005A3952 /* Debug */, 508 | 81D4B0881D3BA06B005A3952 /* Release */, 509 | ); 510 | defaultConfigurationIsVisible = 0; 511 | defaultConfigurationName = Release; 512 | }; 513 | 81D4B0891D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperpositionTests" */ = { 514 | isa = XCConfigurationList; 515 | buildConfigurations = ( 516 | 81D4B08A1D3BA06B005A3952 /* Debug */, 517 | 81D4B08B1D3BA06B005A3952 /* Release */, 518 | ); 519 | defaultConfigurationIsVisible = 0; 520 | defaultConfigurationName = Release; 521 | }; 522 | 81D4B08C1D3BA06B005A3952 /* Build configuration list for PBXNativeTarget "LRLayerSuperpositionUITests" */ = { 523 | isa = XCConfigurationList; 524 | buildConfigurations = ( 525 | 81D4B08D1D3BA06B005A3952 /* Debug */, 526 | 81D4B08E1D3BA06B005A3952 /* Release */, 527 | ); 528 | defaultConfigurationIsVisible = 0; 529 | defaultConfigurationName = Release; 530 | }; 531 | /* End XCConfigurationList section */ 532 | }; 533 | rootObject = 81D4B0511D3BA06A005A3952 /* Project object */; 534 | } 535 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // 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. 25 | // 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. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // 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. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // 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. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/0.imageset/0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/0.imageset/0.jpg -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "0.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/1.imageset/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/1.imageset/2.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/2.imageset/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/2.imageset/4.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "4.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/3.imageset/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/3.imageset/5.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "5.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/4.imageset/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/4.imageset/6.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "6.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/5.imageset/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/5.imageset/8.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "8.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/6.imageset/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/6.imageset/7.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/6.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "7.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/7.imageset/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/7.imageset/9.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/7.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "9.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/8.imageset/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/8.imageset/10.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/8.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "10.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/9.imageset/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/9.imageset/3.png -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/9.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "3.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/bak.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "bak.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/bak.imageset/bak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/LRLayerSuperposition/LRLayerSuperposition/Assets.xcassets/bak.imageset/bak.jpg -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/UIView+Frame.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.h 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Frame) 12 | @property (nonatomic, assign) CGFloat x; 13 | @property (nonatomic, assign) CGFloat y; 14 | @property (nonatomic, assign) CGFloat centerX; 15 | @property (nonatomic, assign) CGFloat centerY; 16 | @property (nonatomic, assign) CGFloat width; 17 | @property (nonatomic, assign) CGFloat height; 18 | @property (nonatomic, assign) CGSize size; 19 | @end -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/UIView+Frame.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Frame.m 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import "UIView+Frame.h" 10 | 11 | @implementation UIView (Frame) 12 | - (void)setX:(CGFloat)x 13 | { 14 | CGRect frame = self.frame; 15 | frame.origin.x = x; 16 | self.frame = frame; 17 | } 18 | 19 | - (CGFloat)x 20 | { 21 | return self.frame.origin.x; 22 | } 23 | 24 | - (void)setY:(CGFloat)y 25 | { 26 | CGRect frame = self.frame; 27 | frame.origin.y = y; 28 | self.frame = frame; 29 | } 30 | 31 | - (CGFloat)y 32 | { 33 | return self.frame.origin.y; 34 | } 35 | 36 | - (void)setCenterX:(CGFloat)centerX 37 | { 38 | CGPoint center = self.center; 39 | center.x = centerX; 40 | self.center = center; 41 | } 42 | 43 | - (CGFloat)centerX 44 | { 45 | return self.center.x; 46 | } 47 | 48 | - (void)setCenterY:(CGFloat)centerY 49 | { 50 | CGPoint center = self.center; 51 | center.y = centerY; 52 | self.center = center; 53 | } 54 | 55 | - (CGFloat)centerY 56 | { 57 | return self.center.y; 58 | } 59 | 60 | - (void)setWidth:(CGFloat)width 61 | { 62 | CGRect frame = self.frame; 63 | frame.size.width = width; 64 | self.frame = frame; 65 | } 66 | 67 | - (CGFloat)width 68 | { 69 | return self.frame.size.width; 70 | } 71 | 72 | - (void)setHeight:(CGFloat)height 73 | { 74 | CGRect frame = self.frame; 75 | frame.size.height = height; 76 | self.frame = frame; 77 | } 78 | 79 | - (CGFloat)height 80 | { 81 | return self.frame.size.height; 82 | } 83 | 84 | - (void)setSize:(CGSize)size 85 | { 86 | CGRect frame = self.frame; 87 | frame.size = size; 88 | self.frame = frame; 89 | } 90 | 91 | - (CGSize)size 92 | { 93 | return self.frame.size; 94 | } 95 | 96 | @end 97 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "LREffectCell.h" 11 | 12 | #define LRCellHeight 150 13 | 14 | #define LRLastCellHeight 230 15 | 16 | #define LRGetImage(row) [UIImage imageNamed:[NSString stringWithFormat:@"%zd",row]] 17 | 18 | @interface ViewController () 19 | 20 | @property(nonatomic, weak)UITableView *tableView; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | 29 | [self createTableView]; 30 | } 31 | 32 | 33 | //创建tableView 34 | - (void)createTableView 35 | { 36 | UITableView *tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStylePlain]; 37 | tableView.delegate = self; 38 | tableView.dataSource = self; 39 | UIImageView *imagView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"bak"]]; 40 | imagView.contentMode = UIViewContentModeScaleAspectFill; 41 | tableView.backgroundView = imagView; 42 | tableView.contentInset = UIEdgeInsetsMake(LRLastCellHeight - LRCellHeight, 0, tableView.frame.size.height-LRLastCellHeight, 0); 43 | tableView.separatorStyle = UITableViewCellSeparatorStyleNone; 44 | [self.view addSubview:tableView]; 45 | _tableView = tableView; 46 | 47 | } 48 | 49 | #pragma mark - 50 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 51 | { 52 | return 10; 53 | } 54 | 55 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 56 | { 57 | LREffectCell * effectCell = [LREffectCell cellFromTableView:tableView]; 58 | 59 | return effectCell; 60 | } 61 | 62 | 63 | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath 64 | { 65 | LREffectCell * effectCell = (LREffectCell *)cell; 66 | 67 | effectCell.backGImage.image = LRGetImage(indexPath.row); 68 | 69 | //初始化 -> 调用第一次滚动 70 | [effectCell cellOffsetOnTabelView:_tableView]; 71 | } 72 | 73 | 74 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath 75 | { 76 | return LRCellHeight; 77 | } 78 | 79 | 80 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 81 | { 82 | // [_tableView visibleCells]:获取表视图的可见单元格。(可见的视图) 83 | //遍历 84 | [[_tableView visibleCells] enumerateObjectsUsingBlock:^(LREffectCell * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 85 | //cell偏移设置 86 | [obj cellOffsetOnTabelView:_tableView]; 87 | 88 | }]; 89 | 90 | } 91 | 92 | 93 | @end 94 | 95 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperposition/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LRLayerSuperposition 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperpositionTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperpositionTests/LRLayerSuperpositionTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LRLayerSuperpositionTests.m 3 | // LRLayerSuperpositionTests 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LRLayerSuperpositionTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LRLayerSuperpositionTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperpositionUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LRLayerSuperposition/LRLayerSuperpositionUITests/LRLayerSuperpositionUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LRLayerSuperpositionUITests.m 3 | // LRLayerSuperpositionUITests 4 | // 5 | // Created by 卢然 on 16/7/17. 6 | // Copyright © 2016年 scorpio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LRLayerSuperpositionUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LRLayerSuperpositionUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LRLayerSuperposition 2 | 3 | #效果图 4 | ![image](https://github.com/luran2358/LRLayerSuperposition/blob/master/image.gif?raw=true) -------------------------------------------------------------------------------- /image.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/luran2358/LRLayerSuperposition/b924daaddf1aea5cd7db7254846b2aa4b9e33791/image.gif --------------------------------------------------------------------------------