├── .DS_Store ├── .gitignore ├── LICENSE ├── LZBRecordingVideo ├── .DS_Store ├── LZBRecordingVideo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── LZBRecordingVideo │ ├── .DS_Store │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Class │ │ ├── .DS_Store │ │ ├── LZBRecordVideoVC.h │ │ ├── LZBRecordVideoVC.m │ │ ├── RecordTool │ │ │ ├── LZBRecordProcessView.h │ │ │ ├── LZBRecordProcessView.m │ │ │ ├── LZBRecordVideoTool.h │ │ │ └── LZBRecordVideoTool.m │ │ └── Resource │ │ │ ├── room_pop_up_lamp@2x.png │ │ │ ├── room_pop_up_lamp@3x.png │ │ │ ├── room_task_video_start@2x.png │ │ │ ├── room_task_video_start@3x.png │ │ │ ├── room_task_video_start_fold@2x.png │ │ │ ├── room_task_video_start_fold@3x.png │ │ │ ├── shortvideo_button_close@2x.png │ │ │ ├── shortvideo_button_close@3x.png │ │ │ ├── shortvideo_download_5_refresh@2x.png │ │ │ └── shortvideo_download_5_refresh@3x.png │ ├── Info.plist │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── LZBRecordingVideoTests │ ├── Info.plist │ └── LZBRecordingVideoTests.m └── LZBRecordingVideoUITests │ ├── Info.plist │ └── LZBRecordingVideoUITests.m └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/.DS_Store -------------------------------------------------------------------------------- /.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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/.DS_Store -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 187115D41E62AAD600524A3B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 187115D31E62AAD600524A3B /* main.m */; }; 11 | 187115D71E62AAD600524A3B /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 187115D61E62AAD600524A3B /* AppDelegate.m */; }; 12 | 187115DA1E62AAD600524A3B /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 187115D91E62AAD600524A3B /* ViewController.m */; }; 13 | 187115DD1E62AAD600524A3B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 187115DB1E62AAD600524A3B /* Main.storyboard */; }; 14 | 187115DF1E62AAD600524A3B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 187115DE1E62AAD600524A3B /* Assets.xcassets */; }; 15 | 187115E21E62AAD600524A3B /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 187115E01E62AAD600524A3B /* LaunchScreen.storyboard */; }; 16 | 187115ED1E62AAD600524A3B /* LZBRecordingVideoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 187115EC1E62AAD600524A3B /* LZBRecordingVideoTests.m */; }; 17 | 187115F81E62AAD600524A3B /* LZBRecordingVideoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 187115F71E62AAD600524A3B /* LZBRecordingVideoUITests.m */; }; 18 | 1871160A1E62AF4C00524A3B /* LZBRecordVideoTool.m in Sources */ = {isa = PBXBuildFile; fileRef = 187116091E62AF4C00524A3B /* LZBRecordVideoTool.m */; }; 19 | 1871160D1E62CEA000524A3B /* LZBRecordVideoVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 1871160C1E62CEA000524A3B /* LZBRecordVideoVC.m */; }; 20 | 18A2E64D1E62D7850081DD8B /* shortvideo_button_close@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E64B1E62D7850081DD8B /* shortvideo_button_close@2x.png */; }; 21 | 18A2E64E1E62D7850081DD8B /* shortvideo_button_close@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E64C1E62D7850081DD8B /* shortvideo_button_close@3x.png */; }; 22 | 18A2E6511E62D7E10081DD8B /* shortvideo_download_5_refresh@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E64F1E62D7E10081DD8B /* shortvideo_download_5_refresh@2x.png */; }; 23 | 18A2E6521E62D7E10081DD8B /* shortvideo_download_5_refresh@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E6501E62D7E10081DD8B /* shortvideo_download_5_refresh@3x.png */; }; 24 | 18A2E6571E62D82C0081DD8B /* room_task_video_start_fold@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E6531E62D82C0081DD8B /* room_task_video_start_fold@2x.png */; }; 25 | 18A2E6581E62D82C0081DD8B /* room_task_video_start_fold@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E6541E62D82C0081DD8B /* room_task_video_start_fold@3x.png */; }; 26 | 18A2E6591E62D82C0081DD8B /* room_task_video_start@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E6551E62D82C0081DD8B /* room_task_video_start@2x.png */; }; 27 | 18A2E65A1E62D82C0081DD8B /* room_task_video_start@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E6561E62D82C0081DD8B /* room_task_video_start@3x.png */; }; 28 | 18A2E65D1E62D86D0081DD8B /* room_pop_up_lamp@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E65B1E62D86D0081DD8B /* room_pop_up_lamp@2x.png */; }; 29 | 18A2E65E1E62D86D0081DD8B /* room_pop_up_lamp@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 18A2E65C1E62D86D0081DD8B /* room_pop_up_lamp@3x.png */; }; 30 | 18A2E6611E62F3640081DD8B /* LZBRecordProcessView.m in Sources */ = {isa = PBXBuildFile; fileRef = 18A2E6601E62F3640081DD8B /* LZBRecordProcessView.m */; }; 31 | /* End PBXBuildFile section */ 32 | 33 | /* Begin PBXContainerItemProxy section */ 34 | 187115E91E62AAD600524A3B /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 187115C71E62AAD600524A3B /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 187115CE1E62AAD600524A3B; 39 | remoteInfo = LZBRecordingVideo; 40 | }; 41 | 187115F41E62AAD600524A3B /* PBXContainerItemProxy */ = { 42 | isa = PBXContainerItemProxy; 43 | containerPortal = 187115C71E62AAD600524A3B /* Project object */; 44 | proxyType = 1; 45 | remoteGlobalIDString = 187115CE1E62AAD600524A3B; 46 | remoteInfo = LZBRecordingVideo; 47 | }; 48 | /* End PBXContainerItemProxy section */ 49 | 50 | /* Begin PBXFileReference section */ 51 | 187115CF1E62AAD600524A3B /* LZBRecordingVideo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LZBRecordingVideo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 187115D31E62AAD600524A3B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 53 | 187115D51E62AAD600524A3B /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | 187115D61E62AAD600524A3B /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | 187115D81E62AAD600524A3B /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 56 | 187115D91E62AAD600524A3B /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 57 | 187115DC1E62AAD600524A3B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 58 | 187115DE1E62AAD600524A3B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 59 | 187115E11E62AAD600524A3B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 60 | 187115E31E62AAD600524A3B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 187115E81E62AAD600524A3B /* LZBRecordingVideoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LZBRecordingVideoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 187115EC1E62AAD600524A3B /* LZBRecordingVideoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LZBRecordingVideoTests.m; sourceTree = ""; }; 63 | 187115EE1E62AAD600524A3B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 187115F31E62AAD600524A3B /* LZBRecordingVideoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LZBRecordingVideoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 65 | 187115F71E62AAD600524A3B /* LZBRecordingVideoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LZBRecordingVideoUITests.m; sourceTree = ""; }; 66 | 187115F91E62AAD600524A3B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 67 | 187116081E62AF4C00524A3B /* LZBRecordVideoTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZBRecordVideoTool.h; sourceTree = ""; }; 68 | 187116091E62AF4C00524A3B /* LZBRecordVideoTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZBRecordVideoTool.m; sourceTree = ""; }; 69 | 1871160B1E62CEA000524A3B /* LZBRecordVideoVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LZBRecordVideoVC.h; path = Class/LZBRecordVideoVC.h; sourceTree = ""; }; 70 | 1871160C1E62CEA000524A3B /* LZBRecordVideoVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LZBRecordVideoVC.m; path = Class/LZBRecordVideoVC.m; sourceTree = ""; }; 71 | 18A2E64B1E62D7850081DD8B /* shortvideo_button_close@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shortvideo_button_close@2x.png"; sourceTree = ""; }; 72 | 18A2E64C1E62D7850081DD8B /* shortvideo_button_close@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shortvideo_button_close@3x.png"; sourceTree = ""; }; 73 | 18A2E64F1E62D7E10081DD8B /* shortvideo_download_5_refresh@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shortvideo_download_5_refresh@2x.png"; sourceTree = ""; }; 74 | 18A2E6501E62D7E10081DD8B /* shortvideo_download_5_refresh@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "shortvideo_download_5_refresh@3x.png"; sourceTree = ""; }; 75 | 18A2E6531E62D82C0081DD8B /* room_task_video_start_fold@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_task_video_start_fold@2x.png"; sourceTree = ""; }; 76 | 18A2E6541E62D82C0081DD8B /* room_task_video_start_fold@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_task_video_start_fold@3x.png"; sourceTree = ""; }; 77 | 18A2E6551E62D82C0081DD8B /* room_task_video_start@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_task_video_start@2x.png"; sourceTree = ""; }; 78 | 18A2E6561E62D82C0081DD8B /* room_task_video_start@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_task_video_start@3x.png"; sourceTree = ""; }; 79 | 18A2E65B1E62D86D0081DD8B /* room_pop_up_lamp@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_pop_up_lamp@2x.png"; sourceTree = ""; }; 80 | 18A2E65C1E62D86D0081DD8B /* room_pop_up_lamp@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "room_pop_up_lamp@3x.png"; sourceTree = ""; }; 81 | 18A2E65F1E62F3640081DD8B /* LZBRecordProcessView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LZBRecordProcessView.h; sourceTree = ""; }; 82 | 18A2E6601E62F3640081DD8B /* LZBRecordProcessView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LZBRecordProcessView.m; sourceTree = ""; }; 83 | /* End PBXFileReference section */ 84 | 85 | /* Begin PBXFrameworksBuildPhase section */ 86 | 187115CC1E62AAD600524A3B /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | 187115E51E62AAD600524A3B /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | 187115F01E62AAD600524A3B /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | /* End PBXFrameworksBuildPhase section */ 108 | 109 | /* Begin PBXGroup section */ 110 | 187115C61E62AAD600524A3B = { 111 | isa = PBXGroup; 112 | children = ( 113 | 187115D11E62AAD600524A3B /* LZBRecordingVideo */, 114 | 187115EB1E62AAD600524A3B /* LZBRecordingVideoTests */, 115 | 187115F61E62AAD600524A3B /* LZBRecordingVideoUITests */, 116 | 187115D01E62AAD600524A3B /* Products */, 117 | ); 118 | sourceTree = ""; 119 | }; 120 | 187115D01E62AAD600524A3B /* Products */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 187115CF1E62AAD600524A3B /* LZBRecordingVideo.app */, 124 | 187115E81E62AAD600524A3B /* LZBRecordingVideoTests.xctest */, 125 | 187115F31E62AAD600524A3B /* LZBRecordingVideoUITests.xctest */, 126 | ); 127 | name = Products; 128 | sourceTree = ""; 129 | }; 130 | 187115D11E62AAD600524A3B /* LZBRecordingVideo */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 187116061E62AF0500524A3B /* Class */, 134 | 187115D51E62AAD600524A3B /* AppDelegate.h */, 135 | 187115D61E62AAD600524A3B /* AppDelegate.m */, 136 | 1871160B1E62CEA000524A3B /* LZBRecordVideoVC.h */, 137 | 1871160C1E62CEA000524A3B /* LZBRecordVideoVC.m */, 138 | 187115D81E62AAD600524A3B /* ViewController.h */, 139 | 187115D91E62AAD600524A3B /* ViewController.m */, 140 | 187115DB1E62AAD600524A3B /* Main.storyboard */, 141 | 187115DE1E62AAD600524A3B /* Assets.xcassets */, 142 | 187115E01E62AAD600524A3B /* LaunchScreen.storyboard */, 143 | 187115E31E62AAD600524A3B /* Info.plist */, 144 | 187115D21E62AAD600524A3B /* Supporting Files */, 145 | ); 146 | path = LZBRecordingVideo; 147 | sourceTree = ""; 148 | }; 149 | 187115D21E62AAD600524A3B /* Supporting Files */ = { 150 | isa = PBXGroup; 151 | children = ( 152 | 187115D31E62AAD600524A3B /* main.m */, 153 | ); 154 | name = "Supporting Files"; 155 | sourceTree = ""; 156 | }; 157 | 187115EB1E62AAD600524A3B /* LZBRecordingVideoTests */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 187115EC1E62AAD600524A3B /* LZBRecordingVideoTests.m */, 161 | 187115EE1E62AAD600524A3B /* Info.plist */, 162 | ); 163 | path = LZBRecordingVideoTests; 164 | sourceTree = ""; 165 | }; 166 | 187115F61E62AAD600524A3B /* LZBRecordingVideoUITests */ = { 167 | isa = PBXGroup; 168 | children = ( 169 | 187115F71E62AAD600524A3B /* LZBRecordingVideoUITests.m */, 170 | 187115F91E62AAD600524A3B /* Info.plist */, 171 | ); 172 | path = LZBRecordingVideoUITests; 173 | sourceTree = ""; 174 | }; 175 | 187116061E62AF0500524A3B /* Class */ = { 176 | isa = PBXGroup; 177 | children = ( 178 | 18A2E64A1E62D7490081DD8B /* Resource */, 179 | 187116071E62AF0500524A3B /* RecordTool */, 180 | ); 181 | path = Class; 182 | sourceTree = ""; 183 | }; 184 | 187116071E62AF0500524A3B /* RecordTool */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 187116081E62AF4C00524A3B /* LZBRecordVideoTool.h */, 188 | 187116091E62AF4C00524A3B /* LZBRecordVideoTool.m */, 189 | 18A2E65F1E62F3640081DD8B /* LZBRecordProcessView.h */, 190 | 18A2E6601E62F3640081DD8B /* LZBRecordProcessView.m */, 191 | ); 192 | path = RecordTool; 193 | sourceTree = ""; 194 | }; 195 | 18A2E64A1E62D7490081DD8B /* Resource */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 18A2E65B1E62D86D0081DD8B /* room_pop_up_lamp@2x.png */, 199 | 18A2E65C1E62D86D0081DD8B /* room_pop_up_lamp@3x.png */, 200 | 18A2E6531E62D82C0081DD8B /* room_task_video_start_fold@2x.png */, 201 | 18A2E6541E62D82C0081DD8B /* room_task_video_start_fold@3x.png */, 202 | 18A2E6551E62D82C0081DD8B /* room_task_video_start@2x.png */, 203 | 18A2E6561E62D82C0081DD8B /* room_task_video_start@3x.png */, 204 | 18A2E64F1E62D7E10081DD8B /* shortvideo_download_5_refresh@2x.png */, 205 | 18A2E6501E62D7E10081DD8B /* shortvideo_download_5_refresh@3x.png */, 206 | 18A2E64B1E62D7850081DD8B /* shortvideo_button_close@2x.png */, 207 | 18A2E64C1E62D7850081DD8B /* shortvideo_button_close@3x.png */, 208 | ); 209 | path = Resource; 210 | sourceTree = ""; 211 | }; 212 | /* End PBXGroup section */ 213 | 214 | /* Begin PBXNativeTarget section */ 215 | 187115CE1E62AAD600524A3B /* LZBRecordingVideo */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = 187115FC1E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideo" */; 218 | buildPhases = ( 219 | 187115CB1E62AAD600524A3B /* Sources */, 220 | 187115CC1E62AAD600524A3B /* Frameworks */, 221 | 187115CD1E62AAD600524A3B /* Resources */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | ); 227 | name = LZBRecordingVideo; 228 | productName = LZBRecordingVideo; 229 | productReference = 187115CF1E62AAD600524A3B /* LZBRecordingVideo.app */; 230 | productType = "com.apple.product-type.application"; 231 | }; 232 | 187115E71E62AAD600524A3B /* LZBRecordingVideoTests */ = { 233 | isa = PBXNativeTarget; 234 | buildConfigurationList = 187115FF1E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideoTests" */; 235 | buildPhases = ( 236 | 187115E41E62AAD600524A3B /* Sources */, 237 | 187115E51E62AAD600524A3B /* Frameworks */, 238 | 187115E61E62AAD600524A3B /* Resources */, 239 | ); 240 | buildRules = ( 241 | ); 242 | dependencies = ( 243 | 187115EA1E62AAD600524A3B /* PBXTargetDependency */, 244 | ); 245 | name = LZBRecordingVideoTests; 246 | productName = LZBRecordingVideoTests; 247 | productReference = 187115E81E62AAD600524A3B /* LZBRecordingVideoTests.xctest */; 248 | productType = "com.apple.product-type.bundle.unit-test"; 249 | }; 250 | 187115F21E62AAD600524A3B /* LZBRecordingVideoUITests */ = { 251 | isa = PBXNativeTarget; 252 | buildConfigurationList = 187116021E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideoUITests" */; 253 | buildPhases = ( 254 | 187115EF1E62AAD600524A3B /* Sources */, 255 | 187115F01E62AAD600524A3B /* Frameworks */, 256 | 187115F11E62AAD600524A3B /* Resources */, 257 | ); 258 | buildRules = ( 259 | ); 260 | dependencies = ( 261 | 187115F51E62AAD600524A3B /* PBXTargetDependency */, 262 | ); 263 | name = LZBRecordingVideoUITests; 264 | productName = LZBRecordingVideoUITests; 265 | productReference = 187115F31E62AAD600524A3B /* LZBRecordingVideoUITests.xctest */; 266 | productType = "com.apple.product-type.bundle.ui-testing"; 267 | }; 268 | /* End PBXNativeTarget section */ 269 | 270 | /* Begin PBXProject section */ 271 | 187115C71E62AAD600524A3B /* Project object */ = { 272 | isa = PBXProject; 273 | attributes = { 274 | LastUpgradeCheck = 0820; 275 | ORGANIZATIONNAME = "子彬"; 276 | TargetAttributes = { 277 | 187115CE1E62AAD600524A3B = { 278 | CreatedOnToolsVersion = 8.2.1; 279 | DevelopmentTeam = Y2H57HDYD9; 280 | ProvisioningStyle = Automatic; 281 | }; 282 | 187115E71E62AAD600524A3B = { 283 | CreatedOnToolsVersion = 8.2.1; 284 | ProvisioningStyle = Automatic; 285 | TestTargetID = 187115CE1E62AAD600524A3B; 286 | }; 287 | 187115F21E62AAD600524A3B = { 288 | CreatedOnToolsVersion = 8.2.1; 289 | ProvisioningStyle = Automatic; 290 | TestTargetID = 187115CE1E62AAD600524A3B; 291 | }; 292 | }; 293 | }; 294 | buildConfigurationList = 187115CA1E62AAD600524A3B /* Build configuration list for PBXProject "LZBRecordingVideo" */; 295 | compatibilityVersion = "Xcode 3.2"; 296 | developmentRegion = English; 297 | hasScannedForEncodings = 0; 298 | knownRegions = ( 299 | en, 300 | Base, 301 | ); 302 | mainGroup = 187115C61E62AAD600524A3B; 303 | productRefGroup = 187115D01E62AAD600524A3B /* Products */; 304 | projectDirPath = ""; 305 | projectRoot = ""; 306 | targets = ( 307 | 187115CE1E62AAD600524A3B /* LZBRecordingVideo */, 308 | 187115E71E62AAD600524A3B /* LZBRecordingVideoTests */, 309 | 187115F21E62AAD600524A3B /* LZBRecordingVideoUITests */, 310 | ); 311 | }; 312 | /* End PBXProject section */ 313 | 314 | /* Begin PBXResourcesBuildPhase section */ 315 | 187115CD1E62AAD600524A3B /* Resources */ = { 316 | isa = PBXResourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 18A2E6521E62D7E10081DD8B /* shortvideo_download_5_refresh@3x.png in Resources */, 320 | 18A2E64E1E62D7850081DD8B /* shortvideo_button_close@3x.png in Resources */, 321 | 187115E21E62AAD600524A3B /* LaunchScreen.storyboard in Resources */, 322 | 187115DF1E62AAD600524A3B /* Assets.xcassets in Resources */, 323 | 18A2E65E1E62D86D0081DD8B /* room_pop_up_lamp@3x.png in Resources */, 324 | 18A2E65D1E62D86D0081DD8B /* room_pop_up_lamp@2x.png in Resources */, 325 | 18A2E6571E62D82C0081DD8B /* room_task_video_start_fold@2x.png in Resources */, 326 | 18A2E64D1E62D7850081DD8B /* shortvideo_button_close@2x.png in Resources */, 327 | 187115DD1E62AAD600524A3B /* Main.storyboard in Resources */, 328 | 18A2E6591E62D82C0081DD8B /* room_task_video_start@2x.png in Resources */, 329 | 18A2E65A1E62D82C0081DD8B /* room_task_video_start@3x.png in Resources */, 330 | 18A2E6511E62D7E10081DD8B /* shortvideo_download_5_refresh@2x.png in Resources */, 331 | 18A2E6581E62D82C0081DD8B /* room_task_video_start_fold@3x.png in Resources */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | 187115E61E62AAD600524A3B /* Resources */ = { 336 | isa = PBXResourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | 187115F11E62AAD600524A3B /* Resources */ = { 343 | isa = PBXResourcesBuildPhase; 344 | buildActionMask = 2147483647; 345 | files = ( 346 | ); 347 | runOnlyForDeploymentPostprocessing = 0; 348 | }; 349 | /* End PBXResourcesBuildPhase section */ 350 | 351 | /* Begin PBXSourcesBuildPhase section */ 352 | 187115CB1E62AAD600524A3B /* Sources */ = { 353 | isa = PBXSourcesBuildPhase; 354 | buildActionMask = 2147483647; 355 | files = ( 356 | 187115DA1E62AAD600524A3B /* ViewController.m in Sources */, 357 | 187115D71E62AAD600524A3B /* AppDelegate.m in Sources */, 358 | 18A2E6611E62F3640081DD8B /* LZBRecordProcessView.m in Sources */, 359 | 1871160D1E62CEA000524A3B /* LZBRecordVideoVC.m in Sources */, 360 | 187115D41E62AAD600524A3B /* main.m in Sources */, 361 | 1871160A1E62AF4C00524A3B /* LZBRecordVideoTool.m in Sources */, 362 | ); 363 | runOnlyForDeploymentPostprocessing = 0; 364 | }; 365 | 187115E41E62AAD600524A3B /* Sources */ = { 366 | isa = PBXSourcesBuildPhase; 367 | buildActionMask = 2147483647; 368 | files = ( 369 | 187115ED1E62AAD600524A3B /* LZBRecordingVideoTests.m in Sources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | 187115EF1E62AAD600524A3B /* Sources */ = { 374 | isa = PBXSourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | 187115F81E62AAD600524A3B /* LZBRecordingVideoUITests.m in Sources */, 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | }; 381 | /* End PBXSourcesBuildPhase section */ 382 | 383 | /* Begin PBXTargetDependency section */ 384 | 187115EA1E62AAD600524A3B /* PBXTargetDependency */ = { 385 | isa = PBXTargetDependency; 386 | target = 187115CE1E62AAD600524A3B /* LZBRecordingVideo */; 387 | targetProxy = 187115E91E62AAD600524A3B /* PBXContainerItemProxy */; 388 | }; 389 | 187115F51E62AAD600524A3B /* PBXTargetDependency */ = { 390 | isa = PBXTargetDependency; 391 | target = 187115CE1E62AAD600524A3B /* LZBRecordingVideo */; 392 | targetProxy = 187115F41E62AAD600524A3B /* PBXContainerItemProxy */; 393 | }; 394 | /* End PBXTargetDependency section */ 395 | 396 | /* Begin PBXVariantGroup section */ 397 | 187115DB1E62AAD600524A3B /* Main.storyboard */ = { 398 | isa = PBXVariantGroup; 399 | children = ( 400 | 187115DC1E62AAD600524A3B /* Base */, 401 | ); 402 | name = Main.storyboard; 403 | sourceTree = ""; 404 | }; 405 | 187115E01E62AAD600524A3B /* LaunchScreen.storyboard */ = { 406 | isa = PBXVariantGroup; 407 | children = ( 408 | 187115E11E62AAD600524A3B /* Base */, 409 | ); 410 | name = LaunchScreen.storyboard; 411 | sourceTree = ""; 412 | }; 413 | /* End PBXVariantGroup section */ 414 | 415 | /* Begin XCBuildConfiguration section */ 416 | 187115FA1E62AAD600524A3B /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ALWAYS_SEARCH_USER_PATHS = NO; 420 | CLANG_ANALYZER_NONNULL = YES; 421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 422 | CLANG_CXX_LIBRARY = "libc++"; 423 | CLANG_ENABLE_MODULES = YES; 424 | CLANG_ENABLE_OBJC_ARC = YES; 425 | CLANG_WARN_BOOL_CONVERSION = YES; 426 | CLANG_WARN_CONSTANT_CONVERSION = YES; 427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 428 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 429 | CLANG_WARN_EMPTY_BODY = YES; 430 | CLANG_WARN_ENUM_CONVERSION = YES; 431 | CLANG_WARN_INFINITE_RECURSION = YES; 432 | CLANG_WARN_INT_CONVERSION = YES; 433 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 434 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 435 | CLANG_WARN_UNREACHABLE_CODE = YES; 436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 437 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 438 | COPY_PHASE_STRIP = NO; 439 | DEBUG_INFORMATION_FORMAT = dwarf; 440 | ENABLE_STRICT_OBJC_MSGSEND = YES; 441 | ENABLE_TESTABILITY = YES; 442 | GCC_C_LANGUAGE_STANDARD = gnu99; 443 | GCC_DYNAMIC_NO_PIC = NO; 444 | GCC_NO_COMMON_BLOCKS = YES; 445 | GCC_OPTIMIZATION_LEVEL = 0; 446 | GCC_PREPROCESSOR_DEFINITIONS = ( 447 | "DEBUG=1", 448 | "$(inherited)", 449 | ); 450 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 451 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 452 | GCC_WARN_UNDECLARED_SELECTOR = YES; 453 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 454 | GCC_WARN_UNUSED_FUNCTION = YES; 455 | GCC_WARN_UNUSED_VARIABLE = YES; 456 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 457 | MTL_ENABLE_DEBUG_INFO = YES; 458 | ONLY_ACTIVE_ARCH = YES; 459 | SDKROOT = iphoneos; 460 | TARGETED_DEVICE_FAMILY = "1,2"; 461 | }; 462 | name = Debug; 463 | }; 464 | 187115FB1E62AAD600524A3B /* Release */ = { 465 | isa = XCBuildConfiguration; 466 | buildSettings = { 467 | ALWAYS_SEARCH_USER_PATHS = NO; 468 | CLANG_ANALYZER_NONNULL = YES; 469 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 470 | CLANG_CXX_LIBRARY = "libc++"; 471 | CLANG_ENABLE_MODULES = YES; 472 | CLANG_ENABLE_OBJC_ARC = YES; 473 | CLANG_WARN_BOOL_CONVERSION = YES; 474 | CLANG_WARN_CONSTANT_CONVERSION = YES; 475 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 476 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 477 | CLANG_WARN_EMPTY_BODY = YES; 478 | CLANG_WARN_ENUM_CONVERSION = YES; 479 | CLANG_WARN_INFINITE_RECURSION = YES; 480 | CLANG_WARN_INT_CONVERSION = YES; 481 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 482 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 483 | CLANG_WARN_UNREACHABLE_CODE = YES; 484 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 485 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 486 | COPY_PHASE_STRIP = NO; 487 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 488 | ENABLE_NS_ASSERTIONS = NO; 489 | ENABLE_STRICT_OBJC_MSGSEND = YES; 490 | GCC_C_LANGUAGE_STANDARD = gnu99; 491 | GCC_NO_COMMON_BLOCKS = YES; 492 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 493 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 494 | GCC_WARN_UNDECLARED_SELECTOR = YES; 495 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 496 | GCC_WARN_UNUSED_FUNCTION = YES; 497 | GCC_WARN_UNUSED_VARIABLE = YES; 498 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 499 | MTL_ENABLE_DEBUG_INFO = NO; 500 | SDKROOT = iphoneos; 501 | TARGETED_DEVICE_FAMILY = "1,2"; 502 | VALIDATE_PRODUCT = YES; 503 | }; 504 | name = Release; 505 | }; 506 | 187115FD1E62AAD600524A3B /* Debug */ = { 507 | isa = XCBuildConfiguration; 508 | buildSettings = { 509 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 510 | DEVELOPMENT_TEAM = Y2H57HDYD9; 511 | INFOPLIST_FILE = LZBRecordingVideo/Info.plist; 512 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 513 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 514 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideo; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | }; 517 | name = Debug; 518 | }; 519 | 187115FE1E62AAD600524A3B /* Release */ = { 520 | isa = XCBuildConfiguration; 521 | buildSettings = { 522 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 523 | DEVELOPMENT_TEAM = Y2H57HDYD9; 524 | INFOPLIST_FILE = LZBRecordingVideo/Info.plist; 525 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 526 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 527 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideo; 528 | PRODUCT_NAME = "$(TARGET_NAME)"; 529 | }; 530 | name = Release; 531 | }; 532 | 187116001E62AAD600524A3B /* Debug */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | BUNDLE_LOADER = "$(TEST_HOST)"; 536 | INFOPLIST_FILE = LZBRecordingVideoTests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideoTests; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LZBRecordingVideo.app/LZBRecordingVideo"; 541 | }; 542 | name = Debug; 543 | }; 544 | 187116011E62AAD600524A3B /* Release */ = { 545 | isa = XCBuildConfiguration; 546 | buildSettings = { 547 | BUNDLE_LOADER = "$(TEST_HOST)"; 548 | INFOPLIST_FILE = LZBRecordingVideoTests/Info.plist; 549 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 550 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideoTests; 551 | PRODUCT_NAME = "$(TARGET_NAME)"; 552 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LZBRecordingVideo.app/LZBRecordingVideo"; 553 | }; 554 | name = Release; 555 | }; 556 | 187116031E62AAD600524A3B /* Debug */ = { 557 | isa = XCBuildConfiguration; 558 | buildSettings = { 559 | INFOPLIST_FILE = LZBRecordingVideoUITests/Info.plist; 560 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 561 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideoUITests; 562 | PRODUCT_NAME = "$(TARGET_NAME)"; 563 | TEST_TARGET_NAME = LZBRecordingVideo; 564 | }; 565 | name = Debug; 566 | }; 567 | 187116041E62AAD600524A3B /* Release */ = { 568 | isa = XCBuildConfiguration; 569 | buildSettings = { 570 | INFOPLIST_FILE = LZBRecordingVideoUITests/Info.plist; 571 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 572 | PRODUCT_BUNDLE_IDENTIFIER = com.lzbcoder.LZBRecordingVideoUITests; 573 | PRODUCT_NAME = "$(TARGET_NAME)"; 574 | TEST_TARGET_NAME = LZBRecordingVideo; 575 | }; 576 | name = Release; 577 | }; 578 | /* End XCBuildConfiguration section */ 579 | 580 | /* Begin XCConfigurationList section */ 581 | 187115CA1E62AAD600524A3B /* Build configuration list for PBXProject "LZBRecordingVideo" */ = { 582 | isa = XCConfigurationList; 583 | buildConfigurations = ( 584 | 187115FA1E62AAD600524A3B /* Debug */, 585 | 187115FB1E62AAD600524A3B /* Release */, 586 | ); 587 | defaultConfigurationIsVisible = 0; 588 | defaultConfigurationName = Release; 589 | }; 590 | 187115FC1E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideo" */ = { 591 | isa = XCConfigurationList; 592 | buildConfigurations = ( 593 | 187115FD1E62AAD600524A3B /* Debug */, 594 | 187115FE1E62AAD600524A3B /* Release */, 595 | ); 596 | defaultConfigurationIsVisible = 0; 597 | defaultConfigurationName = Release; 598 | }; 599 | 187115FF1E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideoTests" */ = { 600 | isa = XCConfigurationList; 601 | buildConfigurations = ( 602 | 187116001E62AAD600524A3B /* Debug */, 603 | 187116011E62AAD600524A3B /* Release */, 604 | ); 605 | defaultConfigurationIsVisible = 0; 606 | defaultConfigurationName = Release; 607 | }; 608 | 187116021E62AAD600524A3B /* Build configuration list for PBXNativeTarget "LZBRecordingVideoUITests" */ = { 609 | isa = XCConfigurationList; 610 | buildConfigurations = ( 611 | 187116031E62AAD600524A3B /* Debug */, 612 | 187116041E62AAD600524A3B /* Release */, 613 | ); 614 | defaultConfigurationIsVisible = 0; 615 | defaultConfigurationName = Release; 616 | }; 617 | /* End XCConfigurationList section */ 618 | }; 619 | rootObject = 187115C71E62AAD600524A3B /* Project object */; 620 | } 621 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/.DS_Store -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. 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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. 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 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 38 | } 39 | 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // 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. 43 | } 44 | 45 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/.DS_Store -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/LZBRecordVideoVC.h: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordVideoVC.h 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LZBRecordVideoVC : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/LZBRecordVideoVC.m: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordVideoVC.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import "LZBRecordVideoVC.h" 10 | #import "LZBRecordVideoTool.h" 11 | #import "LZBRecordProcessView.h" 12 | 13 | #define kVideoMaxTime 15.0 14 | 15 | @interface LZBRecordVideoVC () 16 | 17 | @property (nonatomic, strong) UIView *topView; 18 | @property (nonatomic, strong) UIButton *closeButton; 19 | @property (nonatomic, strong) UIButton *flashButton; 20 | @property (nonatomic, strong) UIButton *cameraButton; 21 | @property (nonatomic, strong) UIButton *recordingButton; 22 | @property (nonatomic, strong) UIView *containerView; 23 | 24 | @property (strong,nonatomic) AVCaptureVideoPreviewLayer *captureVideoPreviewLayer;//相机拍摄预览图层 25 | @property (nonatomic, strong) LZBRecordVideoTool *videoTool; 26 | @property (nonatomic, strong) LZBRecordProcessView *progressView; 27 | @property (nonatomic, assign) CGFloat timeCount; 28 | @property (nonatomic, assign) CGFloat timeMargin; 29 | 30 | @property (nonatomic, strong) NSTimer *timer; 31 | @end 32 | 33 | @implementation LZBRecordVideoVC 34 | 35 | - (void)viewDidLoad { 36 | [super viewDidLoad]; 37 | self.view.backgroundColor = [UIColor colorWithWhite:1 alpha:0.3]; 38 | [self setupSubView]; 39 | [self setupCaptureSession]; 40 | } 41 | 42 | 43 | - (void)viewDidLayoutSubviews 44 | { 45 | [super viewDidLayoutSubviews]; 46 | CGFloat width = [UIScreen mainScreen].bounds.size.width; 47 | CGFloat height = [UIScreen mainScreen].bounds.size.height; 48 | self.topView.frame = CGRectMake(0, 0, width, 80); 49 | self.recordingButton.center = CGPointMake(width *0.5, height - self.recordingButton.bounds.size.height); 50 | self.progressView.center = self.recordingButton.center; 51 | 52 | CGFloat margin = (width - (self.topView.subviews.count *self.cameraButton.bounds.size.width))/self.topView.subviews.count; 53 | for (NSInteger i = 0; i < self.topView.subviews.count; i++) 54 | { 55 | UIButton *button = self.topView.subviews[i]; 56 | CGPoint center = button.center; 57 | center.y = self.topView.bounds.size.height * 0.5; 58 | center.x = margin + i*(self.cameraButton.bounds.size.width+margin); 59 | button.center = center; 60 | } 61 | } 62 | -(void)viewDidDisappear:(BOOL)animated{ 63 | [super viewDidDisappear:animated]; 64 | [self.videoTool stopCapture]; 65 | [self.videoTool stopRecordFunction]; 66 | } 67 | 68 | 69 | - (void)setupSubView 70 | { 71 | [self.view addSubview:self.containerView]; 72 | [self.view addSubview:self.topView]; 73 | [self.topView addSubview:self.closeButton]; 74 | [self.topView addSubview:self.flashButton]; 75 | [self.topView addSubview:self.cameraButton]; 76 | [self.view addSubview:self.progressView]; 77 | [self.view addSubview:self.recordingButton]; 78 | 79 | } 80 | 81 | - (void)setupCaptureSession 82 | { 83 | self.captureVideoPreviewLayer = [self.videoTool previewLayer]; 84 | CALayer *layer=self.containerView.layer; 85 | layer.masksToBounds=YES; 86 | self.captureVideoPreviewLayer.frame = layer.bounds; 87 | [layer addSublayer:self.captureVideoPreviewLayer]; 88 | //开启录制功能 89 | [self.videoTool startRecordFunction]; 90 | } 91 | 92 | #pragma mark- action 93 | - (void)closeButtonClick 94 | { 95 | [self endRecordingVideo]; 96 | [self dismissViewControllerAnimated:YES completion:nil]; 97 | } 98 | 99 | - (void)flashButtonClick:(UIButton *)flashButton 100 | { 101 | flashButton.selected = !flashButton.isSelected; 102 | if(flashButton.selected) 103 | { 104 | [self.videoTool openFlashLight]; 105 | } 106 | else 107 | [self.videoTool closeFlashLight]; 108 | } 109 | 110 | - (void)cameraButtonClick:(UIButton *)cameraButton 111 | { 112 | cameraButton.selected = !cameraButton.isSelected; 113 | if(cameraButton.selected) 114 | { 115 | [self.videoTool changeCameraInputDeviceisFront:YES]; 116 | } 117 | else 118 | [self.videoTool changeCameraInputDeviceisFront:NO]; 119 | } 120 | 121 | - (void)startRecordingVideo 122 | { 123 | [self startTimer]; 124 | [self.videoTool startCapture]; 125 | } 126 | 127 | - (void)endRecordingVideo 128 | { 129 | [self stopTimer]; 130 | [self.videoTool stopCapture]; 131 | } 132 | 133 | #pragma mark - 定时器 134 | - (void)startTimer 135 | { 136 | self.progressView.hidden = NO; 137 | CGFloat signleTime = kVideoMaxTime/360; 138 | self.timeCount = 0; 139 | self.timeMargin = signleTime; 140 | self.timer = [NSTimer scheduledTimerWithTimeInterval:signleTime target:self selector:@selector(updateProgress) userInfo:nil repeats:YES]; 141 | [[NSRunLoop mainRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes]; 142 | } 143 | 144 | - (void)stopTimer 145 | { 146 | self.progressView.progress = 0; 147 | //self.progressView.hidden = YES; 148 | [self.timer invalidate]; 149 | self.timer = nil; 150 | } 151 | 152 | - (void)updateProgress 153 | { 154 | if(self.timeCount >=kVideoMaxTime) 155 | { 156 | [self stopTimer]; 157 | [self endRecordingVideo]; 158 | return; 159 | } 160 | NSLog(@"======%lf",self.timeCount); 161 | self.timeCount +=self.timeMargin; 162 | CGFloat progress = self.timeCount/kVideoMaxTime; 163 | self.progressView.progress = progress; 164 | } 165 | 166 | 167 | 168 | #pragma mark - lazy 169 | - (UIView *)topView 170 | { 171 | if(_topView == nil) 172 | { 173 | _topView = [UIView new]; 174 | _topView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3]; 175 | } 176 | return _topView; 177 | } 178 | 179 | - (UIView *)containerView 180 | { 181 | if(_containerView == nil) 182 | { 183 | _containerView = [[UIView alloc]initWithFrame:self.view.bounds]; 184 | _containerView.backgroundColor = [UIColor greenColor]; 185 | } 186 | return _containerView; 187 | } 188 | 189 | - (UIButton *)closeButton 190 | { 191 | if(_closeButton == nil) 192 | { 193 | _closeButton = [ UIButton buttonWithType:UIButtonTypeCustom]; 194 | [_closeButton setImage:[UIImage imageNamed:@"shortvideo_button_close"] forState:UIControlStateNormal]; 195 | _closeButton.bounds = CGRectMake(0, 0, 50, 50); 196 | _closeButton.layer.cornerRadius = _closeButton.bounds.size.width * 0.5; 197 | _closeButton.layer.masksToBounds = YES; 198 | [_closeButton addTarget:self action:@selector(closeButtonClick) forControlEvents:UIControlEventTouchUpInside]; 199 | } 200 | return _closeButton; 201 | } 202 | 203 | - (UIButton *)flashButton 204 | { 205 | if(_flashButton == nil) 206 | { 207 | _flashButton = [ UIButton buttonWithType:UIButtonTypeCustom]; 208 | [_flashButton setImage:[UIImage imageNamed:@"room_pop_up_lamp"] forState:UIControlStateNormal]; 209 | _flashButton.bounds = CGRectMake(0, 0, 50, 50); 210 | _flashButton.layer.cornerRadius = _flashButton.bounds.size.width * 0.5; 211 | _flashButton.layer.masksToBounds = YES; 212 | [_flashButton addTarget:self action:@selector(flashButtonClick:) forControlEvents:UIControlEventTouchUpInside]; 213 | } 214 | return _flashButton; 215 | } 216 | 217 | - (UIButton *)cameraButton 218 | { 219 | if(_cameraButton == nil) 220 | { 221 | _cameraButton = [ UIButton buttonWithType:UIButtonTypeCustom]; 222 | [_cameraButton setImage:[UIImage imageNamed:@"shortvideo_download_5_refresh"] forState:UIControlStateNormal]; 223 | _cameraButton.bounds = CGRectMake(0, 0, 50, 50); 224 | _cameraButton.layer.cornerRadius = _cameraButton.bounds.size.width * 0.5; 225 | _cameraButton.layer.masksToBounds = YES; 226 | [_cameraButton addTarget:self action:@selector(cameraButtonClick:) forControlEvents:UIControlEventTouchUpInside]; 227 | } 228 | return _cameraButton; 229 | } 230 | 231 | - (UIButton *)recordingButton 232 | { 233 | if(_recordingButton == nil) 234 | { 235 | _recordingButton = [ UIButton buttonWithType:UIButtonTypeCustom]; 236 | [_recordingButton setImage:[UIImage imageNamed:@"room_task_video_start_fold"] forState:UIControlStateNormal]; 237 | _recordingButton.bounds = CGRectMake(0, 0, 50, 50); 238 | _recordingButton.layer.cornerRadius = _recordingButton.bounds.size.width * 0.5; 239 | _recordingButton.layer.masksToBounds = YES; 240 | [_recordingButton addTarget:self action:@selector(startRecordingVideo) forControlEvents:UIControlEventTouchDown]; 241 | [_recordingButton addTarget:self action:@selector(endRecordingVideo) forControlEvents:UIControlEventTouchUpInside]; 242 | 243 | } 244 | return _recordingButton; 245 | } 246 | 247 | - (LZBRecordVideoTool *)videoTool 248 | { 249 | if(_videoTool == nil) 250 | { 251 | _videoTool = [[LZBRecordVideoTool alloc]init]; 252 | } 253 | return _videoTool; 254 | } 255 | 256 | - (LZBRecordProcessView *)progressView 257 | { 258 | if(_progressView == nil) 259 | { 260 | CGFloat widthHeight = self.recordingButton.bounds.size.width +2*lineWith; 261 | _progressView = [[LZBRecordProcessView alloc]initWithCenter:CGPointMake(widthHeight *0.5, widthHeight*0.5) radius:(widthHeight-lineWith) *0.5]; 262 | _progressView.bounds =CGRectMake(0, 0, widthHeight, widthHeight); 263 | _progressView.hidden = YES; 264 | } 265 | return _progressView; 266 | } 267 | 268 | 269 | @end 270 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/RecordTool/LZBRecordProcessView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordProcessView.h 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 子彬. All rights reserved. 7 | // 8 | 9 | #import 10 | #define lineWith 5 11 | 12 | @interface LZBRecordProcessView : UIView 13 | 14 | //初始化 15 | - (instancetype)initWithCenter:(CGPoint )center radius:(CGFloat)radius; 16 | 17 | @property (nonatomic, assign) CGFloat progress; 18 | @end 19 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/RecordTool/LZBRecordProcessView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordProcessView.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 子彬. All rights reserved. 7 | // 8 | 9 | #import "LZBRecordProcessView.h" 10 | 11 | @interface LZBRecordProcessView() 12 | 13 | @property (nonatomic, assign) CGPoint cicleCenter; 14 | @property (nonatomic, assign) CGFloat cicleRadius; 15 | @end 16 | 17 | @implementation LZBRecordProcessView 18 | - (instancetype)initWithCenter:(CGPoint )center radius:(CGFloat)radius 19 | { 20 | if(self = [super init]) 21 | { 22 | self.cicleCenter = center; 23 | self.cicleRadius = radius; 24 | self.backgroundColor = [UIColor clearColor]; 25 | } 26 | return self; 27 | } 28 | 29 | - (void)setProgress:(CGFloat)progress 30 | { 31 | _progress = progress; 32 | [self setNeedsDisplay]; 33 | } 34 | 35 | - (void)drawRect:(CGRect)rect 36 | { 37 | //获取上下文 38 | CGContextRef context = UIGraphicsGetCurrentContext(); 39 | CGPoint center = self.cicleCenter; //设置圆心位置 40 | CGFloat radius = self.cicleRadius; //设置半径 41 | CGFloat startA = -M_PI_2; //圆起点位置 42 | CGFloat endA = -M_PI_2 + M_PI * 2*self.progress; //圆终点位置 43 | 44 | UIBezierPath *path = [UIBezierPath bezierPathWithArcCenter:center radius:radius startAngle:startA endAngle:endA clockwise:YES]; 45 | 46 | CGContextSetLineWidth(context, lineWith*0.5); //设置线条宽度 47 | [[UIColor purpleColor] setStroke]; //设置描边颜色 48 | CGContextAddPath(context, path.CGPath); //把路径添加到上下文 49 | CGContextStrokePath(context); //渲染 50 | 51 | } 52 | @end 53 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/RecordTool/LZBRecordVideoTool.h: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordVideoTool.h 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LZBRecordVideoTool : NSObject 13 | 14 | @property (strong, nonatomic) NSString *videoPath;//视频路径 15 | 16 | //捕获到的视频呈现的layer 17 | - (AVCaptureVideoPreviewLayer *)previewLayer; 18 | 19 | //启动录制功能 20 | - (void)startRecordFunction; 21 | 22 | //关闭录制功能 23 | - (void)stopRecordFunction; 24 | 25 | //开始录制 26 | - (void) startCapture; 27 | 28 | //停止录制 29 | - (void) stopCapture; 30 | 31 | //开启闪光灯 32 | - (void)openFlashLight; 33 | 34 | //关闭闪光灯 35 | - (void)closeFlashLight; 36 | 37 | //切换前后置摄像头 38 | - (void)changeCameraInputDeviceisFront:(BOOL)isFront; 39 | @end 40 | 41 | @interface LZBRecordVideoTool(Authorization) 42 | 43 | /** 44 | 相机是否可以用 45 | */ 46 | - (BOOL)isAvailableWithCamera; 47 | 48 | /** 49 | 麦克风是否可以用 50 | */ 51 | - (BOOL)isAvailableWithMic; 52 | @end 53 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/RecordTool/LZBRecordVideoTool.m: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordVideoTool.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import "LZBRecordVideoTool.h" 10 | #import 11 | #import 12 | 13 | @interface LZBRecordVideoTool() 14 | 15 | @property (strong, nonatomic) AVCaptureSession *captureSession; //负责输入和输出设备之间的连接会话,数据流的管理控制 16 | @property (strong, nonatomic) AVCaptureVideoPreviewLayer *previewLayer;//捕获到的视频呈现的layer 17 | @property (strong, nonatomic) AVCaptureDeviceInput *backCameraInput;//后置摄像头输入 18 | @property (strong, nonatomic) AVCaptureDeviceInput *frontCameraInput;//前置摄像头输入 19 | @property (strong, nonatomic) AVCaptureDeviceInput *audioMicInput;//麦克风输入 20 | @property (strong, nonatomic) AVCaptureConnection *videoConnection;//视频录制连接 21 | @property (strong,nonatomic) AVCaptureMovieFileOutput *captureMovieFileOutput;//视频输出流 22 | @end 23 | 24 | @implementation LZBRecordVideoTool 25 | 26 | 27 | #pragma mark -API 28 | 29 | //启动录制功能 30 | - (void)startRecordFunction 31 | { 32 | [self.captureSession startRunning]; 33 | } 34 | 35 | //关闭录制功能 36 | - (void)stopRecordFunction 37 | { 38 | if(self.captureSession) 39 | [self.captureSession stopRunning]; 40 | } 41 | 42 | //开始录制 43 | - (void)startCapture 44 | { 45 | if(self.captureMovieFileOutput.isRecording) 46 | return; 47 | NSString *defultPath = [self getVideoPathCache]; 48 | NSString *outputFielPath=[ defultPath stringByAppendingPathComponent:[self getVideoNameWithType:@"mp4"]]; 49 | NSLog(@"save path is :%@",outputFielPath); 50 | NSURL *fileUrl=[NSURL fileURLWithPath:outputFielPath]; 51 | //设置录制视频流输出的路径 52 | [self.captureMovieFileOutput startRecordingToOutputFileURL:fileUrl recordingDelegate:self]; 53 | 54 | } 55 | 56 | //停止录制 57 | - (void) stopCapture 58 | { 59 | if ([self.captureMovieFileOutput isRecording]) { 60 | [self.captureMovieFileOutput stopRecording];//停止录制 61 | } 62 | } 63 | 64 | //开启闪光灯 65 | - (void)openFlashLight 66 | { 67 | //改变会话的配置前一定要先开启配置,配置完成后提交配置改变 68 | //[self stopRecordFunction]; 69 | [self.captureSession beginConfiguration]; 70 | AVCaptureDevice *backCamera = [self backCamera]; 71 | if (backCamera.torchMode == AVCaptureTorchModeOff) { 72 | [backCamera lockForConfiguration:nil]; 73 | backCamera.torchMode = AVCaptureTorchModeOn; 74 | backCamera.flashMode = AVCaptureFlashModeOn; 75 | [backCamera unlockForConfiguration]; 76 | } 77 | //提交会话配置 78 | [self.captureSession commitConfiguration]; 79 | [self startRecordFunction]; 80 | } 81 | 82 | //关闭闪光灯 83 | - (void)closeFlashLight 84 | { 85 | //改变会话的配置前一定要先开启配置,配置完成后提交配置改变 86 | // [self stopRecordFunction]; 87 | [self.captureSession beginConfiguration]; 88 | AVCaptureDevice *backCamera = [self backCamera]; 89 | if (backCamera.torchMode == AVCaptureTorchModeOn) { 90 | [backCamera lockForConfiguration:nil]; 91 | backCamera.torchMode = AVCaptureTorchModeOff; 92 | backCamera.flashMode = AVCaptureTorchModeOff; 93 | [backCamera unlockForConfiguration]; 94 | } 95 | //提交会话配置 96 | [self.captureSession commitConfiguration]; 97 | [self startRecordFunction]; 98 | 99 | } 100 | 101 | //切换前后置摄像头 102 | - (void)changeCameraInputDeviceisFront:(BOOL)isFront { 103 | //改变会话的配置前一定要先开启配置,配置完成后提交配置改变 104 | [self stopRecordFunction]; 105 | [self.captureSession beginConfiguration]; 106 | if (isFront) { 107 | 108 | [self.captureSession removeInput:self.backCameraInput]; 109 | if ([self.captureSession canAddInput:self.frontCameraInput]) { 110 | //[self changeCameraAnimation]; 111 | [self.captureSession addInput:self.frontCameraInput]; 112 | } 113 | }else { 114 | [self.captureSession removeInput:self.frontCameraInput]; 115 | if ([self.captureSession canAddInput:self.backCameraInput]) { 116 | //[self changeCameraAnimation]; 117 | [self.captureSession addInput:self.backCameraInput]; 118 | } 119 | } 120 | //提交会话配置 121 | [self.captureSession commitConfiguration]; 122 | [self startRecordFunction]; 123 | } 124 | 125 | #pragma mark - 视频输出代理 126 | -(void)captureOutput:(AVCaptureFileOutput *)captureOutput didStartRecordingToOutputFileAtURL:(NSURL *)fileURL fromConnections:(NSArray *)connections{ 127 | NSLog(@"开始录制..."); 128 | } 129 | -(void)captureOutput:(AVCaptureFileOutput *)captureOutput didFinishRecordingToOutputFileAtURL:(NSURL *)outputFileURL fromConnections:(NSArray *)connections error:(NSError *)error{ 130 | NSLog(@"视频录制完成."); 131 | //视频录入完成之后在后台将视频存储到相 132 | [[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{ 133 | [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:outputFileURL]; 134 | } completionHandler:^(BOOL success, NSError * _Nullable error) { 135 | if (error) { 136 | NSLog(@"保存视频到相簿过程中发生错误,错误信息:%@",error.localizedDescription); 137 | } 138 | NSLog(@"成功保存视频到相簿."); 139 | }]; 140 | 141 | } 142 | 143 | #pragma mark - 视频地址 144 | - (NSString *)getVideoPathCache 145 | { 146 | NSString *videoCache = [NSTemporaryDirectory() stringByAppendingPathComponent:@"videos"] ; 147 | BOOL isDir = NO; 148 | NSFileManager *fileManager = [NSFileManager defaultManager]; 149 | BOOL existed = [fileManager fileExistsAtPath:videoCache isDirectory:&isDir]; 150 | if ( !(isDir == YES && existed == YES) ) { 151 | [fileManager createDirectoryAtPath:videoCache withIntermediateDirectories:YES attributes:nil error:nil]; 152 | }; 153 | return videoCache; 154 | } 155 | - (NSString *)getVideoNameWithType:(NSString *)fileType 156 | { 157 | NSTimeInterval now = [[NSDate date] timeIntervalSince1970]; 158 | NSDateFormatter * formatter = [[NSDateFormatter alloc] init]; 159 | [formatter setDateFormat:@"HHmmss"]; 160 | NSDate * NowDate = [NSDate dateWithTimeIntervalSince1970:now]; 161 | ; 162 | NSString * timeStr = [formatter stringFromDate:NowDate]; 163 | NSString *fileName = [NSString stringWithFormat:@"video_%@.%@",timeStr,fileType]; 164 | return fileName; 165 | } 166 | 167 | 168 | 169 | #pragma mark - Device init Method 170 | //捕获到的视频呈现的layer 171 | - (AVCaptureVideoPreviewLayer *)previewLayer { 172 | if (_previewLayer == nil) { 173 | //通过AVCaptureSession初始化 174 | AVCaptureVideoPreviewLayer *preview = [[AVCaptureVideoPreviewLayer alloc] initWithSession:self.captureSession]; 175 | //设置比例为铺满全屏 176 | preview.videoGravity = AVLayerVideoGravityResizeAspectFill; 177 | _previewLayer = preview; 178 | } 179 | return _previewLayer; 180 | } 181 | 182 | //捕获视频的会话 183 | - (AVCaptureSession *)captureSession 184 | { 185 | if(_captureSession == nil) 186 | { 187 | _captureSession = [[AVCaptureSession alloc] init]; 188 | 189 | //设置分辨率 190 | if ([_captureSession canSetSessionPreset:AVCaptureSessionPreset1280x720]) { 191 | _captureSession.sessionPreset=AVCaptureSessionPreset1280x720; 192 | } 193 | 194 | //添加后置摄像头的输入 195 | if ([_captureSession canAddInput:self.backCameraInput]) { 196 | [_captureSession addInput:self.backCameraInput]; 197 | } 198 | 199 | //添加后置麦克风的输入 200 | if ([_captureSession canAddInput:self.audioMicInput]) { 201 | [_captureSession addInput:self.audioMicInput]; 202 | } 203 | 204 | //将设备输出添加到会话中 205 | if ([_captureSession canAddOutput:self.captureMovieFileOutput]) { 206 | [_captureSession addOutput:self.captureMovieFileOutput]; 207 | } 208 | //设置视频录制的方向 209 | self.videoConnection.videoOrientation = AVCaptureVideoOrientationPortrait; 210 | } 211 | return _captureSession; 212 | } 213 | 214 | 215 | //后置摄像头输入 216 | - (AVCaptureDeviceInput *)backCameraInput { 217 | if (_backCameraInput == nil) { 218 | NSError *error; 219 | _backCameraInput = [[AVCaptureDeviceInput alloc] initWithDevice:[self backCamera] error:&error]; 220 | if (error) { 221 | NSLog(@"获取后置摄像头失败~%d",[self isAvailableWithCamera]); 222 | } 223 | } 224 | return _backCameraInput; 225 | } 226 | 227 | //前置摄像头输入 228 | - (AVCaptureDeviceInput *)frontCameraInput { 229 | if (_frontCameraInput == nil) { 230 | NSError *error; 231 | _frontCameraInput = [[AVCaptureDeviceInput alloc] initWithDevice:[self frontCamera] error:&error]; 232 | if (error) { 233 | NSLog(@"获取前置摄像头失败~"); 234 | } 235 | } 236 | return _frontCameraInput; 237 | } 238 | 239 | //麦克风输入 240 | - (AVCaptureDeviceInput *)audioMicInput { 241 | if (_audioMicInput == nil) { 242 | AVCaptureDevice *mic = [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio]; 243 | NSError *error; 244 | _audioMicInput = [AVCaptureDeviceInput deviceInputWithDevice:mic error:&error]; 245 | if (error) { 246 | 247 | NSLog(@"获取麦克风失败~%d",[self isAvailableWithMic]); 248 | } 249 | } 250 | return _audioMicInput; 251 | } 252 | //初始化设备输出对象,用于获得输出数据 253 | - (AVCaptureMovieFileOutput *)captureMovieFileOutput 254 | { 255 | if(_captureMovieFileOutput == nil) 256 | { 257 | _captureMovieFileOutput = [[AVCaptureMovieFileOutput alloc]init]; 258 | } 259 | return _captureMovieFileOutput; 260 | } 261 | 262 | //视频连接 263 | - (AVCaptureConnection *)videoConnection { 264 | _videoConnection = [self.captureMovieFileOutput connectionWithMediaType:AVMediaTypeVideo]; 265 | if ([_videoConnection isVideoStabilizationSupported ]) { 266 | _videoConnection.preferredVideoStabilizationMode=AVCaptureVideoStabilizationModeAuto; 267 | } 268 | return _videoConnection; 269 | } 270 | 271 | 272 | //返回前置摄像头 273 | - (AVCaptureDevice *)frontCamera { 274 | return [self cameraWithPosition:AVCaptureDevicePositionFront]; 275 | } 276 | 277 | //返回后置摄像头 278 | - (AVCaptureDevice *)backCamera { 279 | return [self cameraWithPosition:AVCaptureDevicePositionBack]; 280 | } 281 | 282 | 283 | 284 | 285 | //用来返回是前置摄像头还是后置摄像头 286 | - (AVCaptureDevice *)cameraWithPosition:(AVCaptureDevicePosition) position { 287 | //返回和视频录制相关的所有默认设备 288 | NSArray *devices = [AVCaptureDevice devicesWithMediaType:AVMediaTypeVideo]; 289 | //遍历这些设备返回跟position相关的设备 290 | for (AVCaptureDevice *device in devices) { 291 | if ([device position] == position) { 292 | return device; 293 | } 294 | } 295 | return nil; 296 | } 297 | @end 298 | 299 | @implementation LZBRecordVideoTool(Authorization) 300 | 301 | - (BOOL)isAvailableWithCamera 302 | { 303 | return [self isAvailableWithDeviveMediaType:AVMediaTypeVideo]; 304 | } 305 | - (BOOL)isAvailableWithMic 306 | { 307 | return [self isAvailableWithDeviveMediaType:AVMediaTypeAudio]; 308 | } 309 | 310 | - (BOOL)isAvailableWithDeviveMediaType:(NSString *)mediaType 311 | { 312 | AVAuthorizationStatus status = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; 313 | if(status == ALAuthorizationStatusDenied||status == ALAuthorizationStatusRestricted) 314 | return NO; 315 | else 316 | return YES; 317 | } 318 | 319 | @end 320 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_pop_up_lamp@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_pop_up_lamp@2x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_pop_up_lamp@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_pop_up_lamp@3x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start@2x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start@3x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start_fold@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start_fold@2x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start_fold@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/room_task_video_start_fold@3x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_button_close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_button_close@2x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_button_close@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_button_close@3x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_download_5_refresh@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_download_5_refresh@2x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_download_5_refresh@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lzbgithubcode/LZBRecordingVideo/8abf866c1f493ca227d9105422c61d6fc1460ca2/LZBRecordingVideo/LZBRecordingVideo/Class/Resource/shortvideo_download_5_refresh@3x.png -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/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 | 20 | NSCameraUsageDescription 21 | cameraDesciption 22 | 23 | NSContactsUsageDescription 24 | contactsDesciption 25 | 26 | NSMicrophoneUsageDescription 27 | microphoneDesciption 28 | 29 | NSPhotoLibraryUsageDescription 30 | 照片管理器 31 | 32 | 33 | CFBundleVersion 34 | 1 35 | LSRequiresIPhoneOS 36 | 37 | UILaunchStoryboardName 38 | LaunchScreen 39 | UIMainStoryboardFile 40 | Main 41 | UIRequiredDeviceCapabilities 42 | 43 | armv7 44 | 45 | UISupportedInterfaceOrientations 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationLandscapeLeft 49 | UIInterfaceOrientationLandscapeRight 50 | 51 | UISupportedInterfaceOrientations~ipad 52 | 53 | UIInterfaceOrientationPortrait 54 | UIInterfaceOrientationPortraitUpsideDown 55 | UIInterfaceOrientationLandscapeLeft 56 | UIInterfaceOrientationLandscapeRight 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "LZBRecordVideoVC.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) UIButton *recordingButton; 15 | 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | [self.view addSubview:self.recordingButton]; 24 | } 25 | 26 | - (void)viewDidLayoutSubviews 27 | { 28 | [super viewDidLayoutSubviews]; 29 | self.recordingButton.center = self.view.center; 30 | self.recordingButton.bounds = CGRectMake(0, 0, 100, 40); 31 | } 32 | 33 | - (void)recordingButtonClick 34 | { 35 | LZBRecordVideoVC *vc = [[LZBRecordVideoVC alloc]init]; 36 | [self presentViewController:vc animated:YES completion:nil]; 37 | } 38 | 39 | #pragma mark - lazy 40 | - (UIButton *)recordingButton 41 | { 42 | if(_recordingButton == nil) 43 | { 44 | _recordingButton = [UIButton buttonWithType:UIButtonTypeCustom]; 45 | [_recordingButton setTitle:@"录制视频" forState:UIControlStateNormal]; 46 | [_recordingButton setTitleColor:[UIColor blueColor] forState:UIControlStateNormal]; 47 | [_recordingButton addTarget:self action:@selector(recordingButtonClick) forControlEvents:UIControlEventTouchUpInside]; 48 | _recordingButton.backgroundColor = [UIColor yellowColor]; 49 | } 50 | return _recordingButton; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LZBRecordingVideo 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. 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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideoTests/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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideoTests/LZBRecordingVideoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordingVideoTests.m 3 | // LZBRecordingVideoTests 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LZBRecordingVideoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LZBRecordingVideoTests 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 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideoUITests/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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LZBRecordingVideo/LZBRecordingVideoUITests/LZBRecordingVideoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LZBRecordingVideoUITests.m 3 | // LZBRecordingVideoUITests 4 | // 5 | // Created by Apple on 2017/2/26. 6 | // Copyright © 2017年 Apple. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LZBRecordingVideoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LZBRecordingVideoUITests 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 | # LZBRecordingVideo 2 | 录制视频 3 | #详情可以查看简书地址:http://www.jianshu.com/p/70084199b5b5 4 | --------------------------------------------------------------------------------