├── .gitignore ├── LICENSE ├── LrdOutputView.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── Up.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── LrdOutputView.xcscheme │ └── xcschememanagement.plist ├── LrdOutputView ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Info.plist ├── LrdOutputView │ ├── LrdOutputView.h │ └── LrdOutputView.m ├── ViewController.h ├── ViewController.m ├── image │ ├── item_battle@2x.png │ ├── item_chat@2x.png │ ├── item_list@2x.png │ ├── item_school@2x.png │ ├── item_share@2x.png │ └── schoolListItem@2x.png └── main.m ├── LrdOutputViewTests ├── Info.plist └── LrdOutputViewTests.m ├── LrdOutputViewUITests ├── Info.plist └── LrdOutputViewUITests.m └── README.md /.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 | *.xccheckout 22 | *.moved-aside 23 | *.xcuserstate 24 | *.xcscmblueprint 25 | 26 | ## Obj-C/Swift specific 27 | *.hmap 28 | *.ipa 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/docs/Gitignore.md 51 | 52 | fastlane/report.xml 53 | fastlane/screenshots 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /LrdOutputView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F5D89F6E1CBF666900A9EFCC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89F6D1CBF666900A9EFCC /* main.m */; }; 11 | F5D89F711CBF666900A9EFCC /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89F701CBF666900A9EFCC /* AppDelegate.m */; }; 12 | F5D89F741CBF666900A9EFCC /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89F731CBF666900A9EFCC /* ViewController.m */; }; 13 | F5D89F771CBF666900A9EFCC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F5D89F751CBF666900A9EFCC /* Main.storyboard */; }; 14 | F5D89F791CBF666900A9EFCC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F5D89F781CBF666900A9EFCC /* Assets.xcassets */; }; 15 | F5D89F7C1CBF666900A9EFCC /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F5D89F7A1CBF666900A9EFCC /* LaunchScreen.storyboard */; }; 16 | F5D89F871CBF666A00A9EFCC /* LrdOutputViewTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89F861CBF666A00A9EFCC /* LrdOutputViewTests.m */; }; 17 | F5D89F921CBF666A00A9EFCC /* LrdOutputViewUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89F911CBF666A00A9EFCC /* LrdOutputViewUITests.m */; }; 18 | F5D89FA21CBF66A900A9EFCC /* LrdOutputView.m in Sources */ = {isa = PBXBuildFile; fileRef = F5D89FA11CBF66A900A9EFCC /* LrdOutputView.m */; }; 19 | F5D89FAA1CBF7F7C00A9EFCC /* item_battle@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA41CBF7F7C00A9EFCC /* item_battle@2x.png */; }; 20 | F5D89FAB1CBF7F7C00A9EFCC /* item_chat@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA51CBF7F7C00A9EFCC /* item_chat@2x.png */; }; 21 | F5D89FAC1CBF7F7C00A9EFCC /* item_list@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA61CBF7F7C00A9EFCC /* item_list@2x.png */; }; 22 | F5D89FAD1CBF7F7C00A9EFCC /* item_school@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA71CBF7F7C00A9EFCC /* item_school@2x.png */; }; 23 | F5D89FAE1CBF7F7C00A9EFCC /* item_share@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA81CBF7F7C00A9EFCC /* item_share@2x.png */; }; 24 | F5D89FAF1CBF7F7C00A9EFCC /* schoolListItem@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F5D89FA91CBF7F7C00A9EFCC /* schoolListItem@2x.png */; }; 25 | /* End PBXBuildFile section */ 26 | 27 | /* Begin PBXContainerItemProxy section */ 28 | F5D89F831CBF666A00A9EFCC /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = F5D89F611CBF666900A9EFCC /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = F5D89F681CBF666900A9EFCC; 33 | remoteInfo = LrdOutputView; 34 | }; 35 | F5D89F8E1CBF666A00A9EFCC /* PBXContainerItemProxy */ = { 36 | isa = PBXContainerItemProxy; 37 | containerPortal = F5D89F611CBF666900A9EFCC /* Project object */; 38 | proxyType = 1; 39 | remoteGlobalIDString = F5D89F681CBF666900A9EFCC; 40 | remoteInfo = LrdOutputView; 41 | }; 42 | /* End PBXContainerItemProxy section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | F5D89F691CBF666900A9EFCC /* LrdOutputView.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LrdOutputView.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | F5D89F6D1CBF666900A9EFCC /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | F5D89F6F1CBF666900A9EFCC /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | F5D89F701CBF666900A9EFCC /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | F5D89F721CBF666900A9EFCC /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 50 | F5D89F731CBF666900A9EFCC /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 51 | F5D89F761CBF666900A9EFCC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 52 | F5D89F781CBF666900A9EFCC /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 53 | F5D89F7B1CBF666900A9EFCC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 54 | F5D89F7D1CBF666900A9EFCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | F5D89F821CBF666A00A9EFCC /* LrdOutputViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LrdOutputViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | F5D89F861CBF666A00A9EFCC /* LrdOutputViewTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LrdOutputViewTests.m; sourceTree = ""; }; 57 | F5D89F881CBF666A00A9EFCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | F5D89F8D1CBF666A00A9EFCC /* LrdOutputViewUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LrdOutputViewUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | F5D89F911CBF666A00A9EFCC /* LrdOutputViewUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LrdOutputViewUITests.m; sourceTree = ""; }; 60 | F5D89F931CBF666A00A9EFCC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | F5D89FA01CBF66A900A9EFCC /* LrdOutputView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LrdOutputView.h; sourceTree = ""; }; 62 | F5D89FA11CBF66A900A9EFCC /* LrdOutputView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LrdOutputView.m; sourceTree = ""; }; 63 | F5D89FA41CBF7F7C00A9EFCC /* item_battle@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "item_battle@2x.png"; sourceTree = ""; }; 64 | F5D89FA51CBF7F7C00A9EFCC /* item_chat@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "item_chat@2x.png"; sourceTree = ""; }; 65 | F5D89FA61CBF7F7C00A9EFCC /* item_list@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "item_list@2x.png"; sourceTree = ""; }; 66 | F5D89FA71CBF7F7C00A9EFCC /* item_school@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "item_school@2x.png"; sourceTree = ""; }; 67 | F5D89FA81CBF7F7C00A9EFCC /* item_share@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "item_share@2x.png"; sourceTree = ""; }; 68 | F5D89FA91CBF7F7C00A9EFCC /* schoolListItem@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "schoolListItem@2x.png"; sourceTree = ""; }; 69 | /* End PBXFileReference section */ 70 | 71 | /* Begin PBXFrameworksBuildPhase section */ 72 | F5D89F661CBF666900A9EFCC /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | F5D89F7F1CBF666A00A9EFCC /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | F5D89F8A1CBF666A00A9EFCC /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | F5D89F601CBF666900A9EFCC = { 97 | isa = PBXGroup; 98 | children = ( 99 | F5D89F6B1CBF666900A9EFCC /* LrdOutputView */, 100 | F5D89F851CBF666A00A9EFCC /* LrdOutputViewTests */, 101 | F5D89F901CBF666A00A9EFCC /* LrdOutputViewUITests */, 102 | F5D89F6A1CBF666900A9EFCC /* Products */, 103 | ); 104 | sourceTree = ""; 105 | }; 106 | F5D89F6A1CBF666900A9EFCC /* Products */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | F5D89F691CBF666900A9EFCC /* LrdOutputView.app */, 110 | F5D89F821CBF666A00A9EFCC /* LrdOutputViewTests.xctest */, 111 | F5D89F8D1CBF666A00A9EFCC /* LrdOutputViewUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | F5D89F6B1CBF666900A9EFCC /* LrdOutputView */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | F5D89F9F1CBF668B00A9EFCC /* LrdOutputView */, 120 | F5D89F6F1CBF666900A9EFCC /* AppDelegate.h */, 121 | F5D89F701CBF666900A9EFCC /* AppDelegate.m */, 122 | F5D89F721CBF666900A9EFCC /* ViewController.h */, 123 | F5D89F731CBF666900A9EFCC /* ViewController.m */, 124 | F5D89F751CBF666900A9EFCC /* Main.storyboard */, 125 | F5D89FA31CBF7F7C00A9EFCC /* image */, 126 | F5D89F781CBF666900A9EFCC /* Assets.xcassets */, 127 | F5D89F7A1CBF666900A9EFCC /* LaunchScreen.storyboard */, 128 | F5D89F7D1CBF666900A9EFCC /* Info.plist */, 129 | F5D89F6C1CBF666900A9EFCC /* Supporting Files */, 130 | ); 131 | path = LrdOutputView; 132 | sourceTree = ""; 133 | }; 134 | F5D89F6C1CBF666900A9EFCC /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | F5D89F6D1CBF666900A9EFCC /* main.m */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | F5D89F851CBF666A00A9EFCC /* LrdOutputViewTests */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | F5D89F861CBF666A00A9EFCC /* LrdOutputViewTests.m */, 146 | F5D89F881CBF666A00A9EFCC /* Info.plist */, 147 | ); 148 | path = LrdOutputViewTests; 149 | sourceTree = ""; 150 | }; 151 | F5D89F901CBF666A00A9EFCC /* LrdOutputViewUITests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | F5D89F911CBF666A00A9EFCC /* LrdOutputViewUITests.m */, 155 | F5D89F931CBF666A00A9EFCC /* Info.plist */, 156 | ); 157 | path = LrdOutputViewUITests; 158 | sourceTree = ""; 159 | }; 160 | F5D89F9F1CBF668B00A9EFCC /* LrdOutputView */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | F5D89FA01CBF66A900A9EFCC /* LrdOutputView.h */, 164 | F5D89FA11CBF66A900A9EFCC /* LrdOutputView.m */, 165 | ); 166 | path = LrdOutputView; 167 | sourceTree = ""; 168 | }; 169 | F5D89FA31CBF7F7C00A9EFCC /* image */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | F5D89FA41CBF7F7C00A9EFCC /* item_battle@2x.png */, 173 | F5D89FA51CBF7F7C00A9EFCC /* item_chat@2x.png */, 174 | F5D89FA61CBF7F7C00A9EFCC /* item_list@2x.png */, 175 | F5D89FA71CBF7F7C00A9EFCC /* item_school@2x.png */, 176 | F5D89FA81CBF7F7C00A9EFCC /* item_share@2x.png */, 177 | F5D89FA91CBF7F7C00A9EFCC /* schoolListItem@2x.png */, 178 | ); 179 | path = image; 180 | sourceTree = ""; 181 | }; 182 | /* End PBXGroup section */ 183 | 184 | /* Begin PBXNativeTarget section */ 185 | F5D89F681CBF666900A9EFCC /* LrdOutputView */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = F5D89F961CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputView" */; 188 | buildPhases = ( 189 | F5D89F651CBF666900A9EFCC /* Sources */, 190 | F5D89F661CBF666900A9EFCC /* Frameworks */, 191 | F5D89F671CBF666900A9EFCC /* Resources */, 192 | ); 193 | buildRules = ( 194 | ); 195 | dependencies = ( 196 | ); 197 | name = LrdOutputView; 198 | productName = LrdOutputView; 199 | productReference = F5D89F691CBF666900A9EFCC /* LrdOutputView.app */; 200 | productType = "com.apple.product-type.application"; 201 | }; 202 | F5D89F811CBF666A00A9EFCC /* LrdOutputViewTests */ = { 203 | isa = PBXNativeTarget; 204 | buildConfigurationList = F5D89F991CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputViewTests" */; 205 | buildPhases = ( 206 | F5D89F7E1CBF666A00A9EFCC /* Sources */, 207 | F5D89F7F1CBF666A00A9EFCC /* Frameworks */, 208 | F5D89F801CBF666A00A9EFCC /* Resources */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | F5D89F841CBF666A00A9EFCC /* PBXTargetDependency */, 214 | ); 215 | name = LrdOutputViewTests; 216 | productName = LrdOutputViewTests; 217 | productReference = F5D89F821CBF666A00A9EFCC /* LrdOutputViewTests.xctest */; 218 | productType = "com.apple.product-type.bundle.unit-test"; 219 | }; 220 | F5D89F8C1CBF666A00A9EFCC /* LrdOutputViewUITests */ = { 221 | isa = PBXNativeTarget; 222 | buildConfigurationList = F5D89F9C1CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputViewUITests" */; 223 | buildPhases = ( 224 | F5D89F891CBF666A00A9EFCC /* Sources */, 225 | F5D89F8A1CBF666A00A9EFCC /* Frameworks */, 226 | F5D89F8B1CBF666A00A9EFCC /* Resources */, 227 | ); 228 | buildRules = ( 229 | ); 230 | dependencies = ( 231 | F5D89F8F1CBF666A00A9EFCC /* PBXTargetDependency */, 232 | ); 233 | name = LrdOutputViewUITests; 234 | productName = LrdOutputViewUITests; 235 | productReference = F5D89F8D1CBF666A00A9EFCC /* LrdOutputViewUITests.xctest */; 236 | productType = "com.apple.product-type.bundle.ui-testing"; 237 | }; 238 | /* End PBXNativeTarget section */ 239 | 240 | /* Begin PBXProject section */ 241 | F5D89F611CBF666900A9EFCC /* Project object */ = { 242 | isa = PBXProject; 243 | attributes = { 244 | LastUpgradeCheck = 0720; 245 | ORGANIZATIONNAME = "键盘上的舞者"; 246 | TargetAttributes = { 247 | F5D89F681CBF666900A9EFCC = { 248 | CreatedOnToolsVersion = 7.2.1; 249 | }; 250 | F5D89F811CBF666A00A9EFCC = { 251 | CreatedOnToolsVersion = 7.2.1; 252 | TestTargetID = F5D89F681CBF666900A9EFCC; 253 | }; 254 | F5D89F8C1CBF666A00A9EFCC = { 255 | CreatedOnToolsVersion = 7.2.1; 256 | TestTargetID = F5D89F681CBF666900A9EFCC; 257 | }; 258 | }; 259 | }; 260 | buildConfigurationList = F5D89F641CBF666900A9EFCC /* Build configuration list for PBXProject "LrdOutputView" */; 261 | compatibilityVersion = "Xcode 3.2"; 262 | developmentRegion = English; 263 | hasScannedForEncodings = 0; 264 | knownRegions = ( 265 | en, 266 | Base, 267 | ); 268 | mainGroup = F5D89F601CBF666900A9EFCC; 269 | productRefGroup = F5D89F6A1CBF666900A9EFCC /* Products */; 270 | projectDirPath = ""; 271 | projectRoot = ""; 272 | targets = ( 273 | F5D89F681CBF666900A9EFCC /* LrdOutputView */, 274 | F5D89F811CBF666A00A9EFCC /* LrdOutputViewTests */, 275 | F5D89F8C1CBF666A00A9EFCC /* LrdOutputViewUITests */, 276 | ); 277 | }; 278 | /* End PBXProject section */ 279 | 280 | /* Begin PBXResourcesBuildPhase section */ 281 | F5D89F671CBF666900A9EFCC /* Resources */ = { 282 | isa = PBXResourcesBuildPhase; 283 | buildActionMask = 2147483647; 284 | files = ( 285 | F5D89F7C1CBF666900A9EFCC /* LaunchScreen.storyboard in Resources */, 286 | F5D89FAA1CBF7F7C00A9EFCC /* item_battle@2x.png in Resources */, 287 | F5D89FAB1CBF7F7C00A9EFCC /* item_chat@2x.png in Resources */, 288 | F5D89FAD1CBF7F7C00A9EFCC /* item_school@2x.png in Resources */, 289 | F5D89FAC1CBF7F7C00A9EFCC /* item_list@2x.png in Resources */, 290 | F5D89F791CBF666900A9EFCC /* Assets.xcassets in Resources */, 291 | F5D89F771CBF666900A9EFCC /* Main.storyboard in Resources */, 292 | F5D89FAE1CBF7F7C00A9EFCC /* item_share@2x.png in Resources */, 293 | F5D89FAF1CBF7F7C00A9EFCC /* schoolListItem@2x.png in Resources */, 294 | ); 295 | runOnlyForDeploymentPostprocessing = 0; 296 | }; 297 | F5D89F801CBF666A00A9EFCC /* Resources */ = { 298 | isa = PBXResourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | ); 302 | runOnlyForDeploymentPostprocessing = 0; 303 | }; 304 | F5D89F8B1CBF666A00A9EFCC /* Resources */ = { 305 | isa = PBXResourcesBuildPhase; 306 | buildActionMask = 2147483647; 307 | files = ( 308 | ); 309 | runOnlyForDeploymentPostprocessing = 0; 310 | }; 311 | /* End PBXResourcesBuildPhase section */ 312 | 313 | /* Begin PBXSourcesBuildPhase section */ 314 | F5D89F651CBF666900A9EFCC /* Sources */ = { 315 | isa = PBXSourcesBuildPhase; 316 | buildActionMask = 2147483647; 317 | files = ( 318 | F5D89FA21CBF66A900A9EFCC /* LrdOutputView.m in Sources */, 319 | F5D89F741CBF666900A9EFCC /* ViewController.m in Sources */, 320 | F5D89F711CBF666900A9EFCC /* AppDelegate.m in Sources */, 321 | F5D89F6E1CBF666900A9EFCC /* main.m in Sources */, 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | F5D89F7E1CBF666A00A9EFCC /* Sources */ = { 326 | isa = PBXSourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | F5D89F871CBF666A00A9EFCC /* LrdOutputViewTests.m in Sources */, 330 | ); 331 | runOnlyForDeploymentPostprocessing = 0; 332 | }; 333 | F5D89F891CBF666A00A9EFCC /* Sources */ = { 334 | isa = PBXSourcesBuildPhase; 335 | buildActionMask = 2147483647; 336 | files = ( 337 | F5D89F921CBF666A00A9EFCC /* LrdOutputViewUITests.m in Sources */, 338 | ); 339 | runOnlyForDeploymentPostprocessing = 0; 340 | }; 341 | /* End PBXSourcesBuildPhase section */ 342 | 343 | /* Begin PBXTargetDependency section */ 344 | F5D89F841CBF666A00A9EFCC /* PBXTargetDependency */ = { 345 | isa = PBXTargetDependency; 346 | target = F5D89F681CBF666900A9EFCC /* LrdOutputView */; 347 | targetProxy = F5D89F831CBF666A00A9EFCC /* PBXContainerItemProxy */; 348 | }; 349 | F5D89F8F1CBF666A00A9EFCC /* PBXTargetDependency */ = { 350 | isa = PBXTargetDependency; 351 | target = F5D89F681CBF666900A9EFCC /* LrdOutputView */; 352 | targetProxy = F5D89F8E1CBF666A00A9EFCC /* PBXContainerItemProxy */; 353 | }; 354 | /* End PBXTargetDependency section */ 355 | 356 | /* Begin PBXVariantGroup section */ 357 | F5D89F751CBF666900A9EFCC /* Main.storyboard */ = { 358 | isa = PBXVariantGroup; 359 | children = ( 360 | F5D89F761CBF666900A9EFCC /* Base */, 361 | ); 362 | name = Main.storyboard; 363 | sourceTree = ""; 364 | }; 365 | F5D89F7A1CBF666900A9EFCC /* LaunchScreen.storyboard */ = { 366 | isa = PBXVariantGroup; 367 | children = ( 368 | F5D89F7B1CBF666900A9EFCC /* Base */, 369 | ); 370 | name = LaunchScreen.storyboard; 371 | sourceTree = ""; 372 | }; 373 | /* End PBXVariantGroup section */ 374 | 375 | /* Begin XCBuildConfiguration section */ 376 | F5D89F941CBF666A00A9EFCC /* Debug */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 381 | CLANG_CXX_LIBRARY = "libc++"; 382 | CLANG_ENABLE_MODULES = YES; 383 | CLANG_ENABLE_OBJC_ARC = YES; 384 | CLANG_WARN_BOOL_CONVERSION = YES; 385 | CLANG_WARN_CONSTANT_CONVERSION = YES; 386 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 387 | CLANG_WARN_EMPTY_BODY = YES; 388 | CLANG_WARN_ENUM_CONVERSION = YES; 389 | CLANG_WARN_INT_CONVERSION = YES; 390 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 391 | CLANG_WARN_UNREACHABLE_CODE = YES; 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 394 | COPY_PHASE_STRIP = NO; 395 | DEBUG_INFORMATION_FORMAT = dwarf; 396 | ENABLE_STRICT_OBJC_MSGSEND = YES; 397 | ENABLE_TESTABILITY = YES; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_DYNAMIC_NO_PIC = NO; 400 | GCC_NO_COMMON_BLOCKS = YES; 401 | GCC_OPTIMIZATION_LEVEL = 0; 402 | GCC_PREPROCESSOR_DEFINITIONS = ( 403 | "DEBUG=1", 404 | "$(inherited)", 405 | ); 406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 413 | MTL_ENABLE_DEBUG_INFO = YES; 414 | ONLY_ACTIVE_ARCH = YES; 415 | SDKROOT = iphoneos; 416 | TARGETED_DEVICE_FAMILY = "1,2"; 417 | }; 418 | name = Debug; 419 | }; 420 | F5D89F951CBF666A00A9EFCC /* Release */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ALWAYS_SEARCH_USER_PATHS = NO; 424 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 425 | CLANG_CXX_LIBRARY = "libc++"; 426 | CLANG_ENABLE_MODULES = YES; 427 | CLANG_ENABLE_OBJC_ARC = YES; 428 | CLANG_WARN_BOOL_CONVERSION = YES; 429 | CLANG_WARN_CONSTANT_CONVERSION = YES; 430 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 431 | CLANG_WARN_EMPTY_BODY = YES; 432 | CLANG_WARN_ENUM_CONVERSION = YES; 433 | CLANG_WARN_INT_CONVERSION = YES; 434 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 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-with-dsym"; 440 | ENABLE_NS_ASSERTIONS = NO; 441 | ENABLE_STRICT_OBJC_MSGSEND = YES; 442 | GCC_C_LANGUAGE_STANDARD = gnu99; 443 | GCC_NO_COMMON_BLOCKS = YES; 444 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 445 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 446 | GCC_WARN_UNDECLARED_SELECTOR = YES; 447 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 448 | GCC_WARN_UNUSED_FUNCTION = YES; 449 | GCC_WARN_UNUSED_VARIABLE = YES; 450 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 451 | MTL_ENABLE_DEBUG_INFO = NO; 452 | SDKROOT = iphoneos; 453 | TARGETED_DEVICE_FAMILY = "1,2"; 454 | VALIDATE_PRODUCT = YES; 455 | }; 456 | name = Release; 457 | }; 458 | F5D89F971CBF666A00A9EFCC /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 462 | INFOPLIST_FILE = LrdOutputView/Info.plist; 463 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 464 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputView; 465 | PRODUCT_NAME = "$(TARGET_NAME)"; 466 | }; 467 | name = Debug; 468 | }; 469 | F5D89F981CBF666A00A9EFCC /* Release */ = { 470 | isa = XCBuildConfiguration; 471 | buildSettings = { 472 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 473 | INFOPLIST_FILE = LrdOutputView/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputView; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | }; 478 | name = Release; 479 | }; 480 | F5D89F9A1CBF666A00A9EFCC /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | buildSettings = { 483 | BUNDLE_LOADER = "$(TEST_HOST)"; 484 | INFOPLIST_FILE = LrdOutputViewTests/Info.plist; 485 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 486 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputViewTests; 487 | PRODUCT_NAME = "$(TARGET_NAME)"; 488 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LrdOutputView.app/LrdOutputView"; 489 | }; 490 | name = Debug; 491 | }; 492 | F5D89F9B1CBF666A00A9EFCC /* Release */ = { 493 | isa = XCBuildConfiguration; 494 | buildSettings = { 495 | BUNDLE_LOADER = "$(TEST_HOST)"; 496 | INFOPLIST_FILE = LrdOutputViewTests/Info.plist; 497 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 498 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputViewTests; 499 | PRODUCT_NAME = "$(TARGET_NAME)"; 500 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LrdOutputView.app/LrdOutputView"; 501 | }; 502 | name = Release; 503 | }; 504 | F5D89F9D1CBF666A00A9EFCC /* Debug */ = { 505 | isa = XCBuildConfiguration; 506 | buildSettings = { 507 | INFOPLIST_FILE = LrdOutputViewUITests/Info.plist; 508 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 509 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputViewUITests; 510 | PRODUCT_NAME = "$(TARGET_NAME)"; 511 | TEST_TARGET_NAME = LrdOutputView; 512 | USES_XCTRUNNER = YES; 513 | }; 514 | name = Debug; 515 | }; 516 | F5D89F9E1CBF666A00A9EFCC /* Release */ = { 517 | isa = XCBuildConfiguration; 518 | buildSettings = { 519 | INFOPLIST_FILE = LrdOutputViewUITests/Info.plist; 520 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 521 | PRODUCT_BUNDLE_IDENTIFIER = com.lrd.LrdOutputViewUITests; 522 | PRODUCT_NAME = "$(TARGET_NAME)"; 523 | TEST_TARGET_NAME = LrdOutputView; 524 | USES_XCTRUNNER = YES; 525 | }; 526 | name = Release; 527 | }; 528 | /* End XCBuildConfiguration section */ 529 | 530 | /* Begin XCConfigurationList section */ 531 | F5D89F641CBF666900A9EFCC /* Build configuration list for PBXProject "LrdOutputView" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | F5D89F941CBF666A00A9EFCC /* Debug */, 535 | F5D89F951CBF666A00A9EFCC /* Release */, 536 | ); 537 | defaultConfigurationIsVisible = 0; 538 | defaultConfigurationName = Release; 539 | }; 540 | F5D89F961CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputView" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | F5D89F971CBF666A00A9EFCC /* Debug */, 544 | F5D89F981CBF666A00A9EFCC /* Release */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | }; 548 | F5D89F991CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputViewTests" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | F5D89F9A1CBF666A00A9EFCC /* Debug */, 552 | F5D89F9B1CBF666A00A9EFCC /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | }; 556 | F5D89F9C1CBF666A00A9EFCC /* Build configuration list for PBXNativeTarget "LrdOutputViewUITests" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | F5D89F9D1CBF666A00A9EFCC /* Debug */, 560 | F5D89F9E1CBF666A00A9EFCC /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | }; 564 | /* End XCConfigurationList section */ 565 | }; 566 | rootObject = F5D89F611CBF666900A9EFCC /* Project object */; 567 | } 568 | -------------------------------------------------------------------------------- /LrdOutputView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LrdOutputView.xcodeproj/xcuserdata/Up.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LrdOutputView.xcodeproj/xcuserdata/Up.xcuserdatad/xcschemes/LrdOutputView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /LrdOutputView.xcodeproj/xcuserdata/Up.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | LrdOutputView.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F5D89F681CBF666900A9EFCC 16 | 17 | primary 18 | 19 | 20 | F5D89F811CBF666A00A9EFCC 21 | 22 | primary 23 | 24 | 25 | F5D89F8C1CBF666A00A9EFCC 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /LrdOutputView/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. 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 | -------------------------------------------------------------------------------- /LrdOutputView/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. 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 | -------------------------------------------------------------------------------- /LrdOutputView/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 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /LrdOutputView/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 | -------------------------------------------------------------------------------- /LrdOutputView/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 24 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /LrdOutputView/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 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /LrdOutputView/LrdOutputView/LrdOutputView.h: -------------------------------------------------------------------------------- 1 | // 2 | // LrdOutputView.h 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @protocol LrdOutputViewDelegate 12 | 13 | @required 14 | - (void)didSelectedAtIndexPath:(NSIndexPath *)indexPath; 15 | 16 | @end 17 | 18 | typedef void(^dismissWithOperation)(); 19 | 20 | typedef NS_ENUM(NSUInteger, LrdOutputViewDirection) { 21 | kLrdOutputViewDirectionLeft = 1, 22 | kLrdOutputViewDirectionRight 23 | }; 24 | 25 | @interface LrdOutputView : UIView 26 | 27 | @property (nonatomic, weak) id delegate; 28 | @property (nonatomic, strong) dismissWithOperation dismissOperation; 29 | 30 | //初始化方法 31 | //传入参数:模型数组,弹出原点,宽度,高度(每个cell的高度) 32 | - (instancetype)initWithDataArray:(NSArray *)dataArray 33 | origin:(CGPoint)origin 34 | width:(CGFloat)width 35 | height:(CGFloat)height 36 | direction:(LrdOutputViewDirection)direction; 37 | 38 | //弹出 39 | - (void)pop; 40 | //消失 41 | - (void)dismiss; 42 | 43 | @end 44 | 45 | 46 | @interface LrdCellModel : NSObject 47 | 48 | @property (nonatomic, copy) NSString *title; 49 | @property (nonatomic, copy) NSString *imageName; 50 | 51 | - (instancetype)initWithTitle:(NSString *)title imageName:(NSString *)imageName; 52 | 53 | @end -------------------------------------------------------------------------------- /LrdOutputView/LrdOutputView/LrdOutputView.m: -------------------------------------------------------------------------------- 1 | // 2 | // LrdOutputView.m 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import "LrdOutputView.h" 10 | 11 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width 12 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height 13 | #define CellLineEdgeInsets UIEdgeInsetsMake(0, 10, 0, 10) 14 | #define LeftToView 10.f 15 | #define TopToView 10.f 16 | 17 | @interface LrdOutputView () 18 | 19 | @property (nonatomic, strong) UITableView *tableView; 20 | @property (nonatomic, assign) CGPoint origin; 21 | @property (nonatomic, assign) CGFloat height; 22 | @property (nonatomic, assign) CGFloat width; 23 | @property (nonatomic, strong) NSArray *dataArray; 24 | @property (nonatomic, assign) LrdOutputViewDirection direction; 25 | 26 | @end 27 | 28 | @implementation LrdOutputView 29 | 30 | - (instancetype)initWithDataArray:(NSArray *)dataArray 31 | origin:(CGPoint)origin 32 | width:(CGFloat)width 33 | height:(CGFloat)height 34 | direction:(LrdOutputViewDirection)direction { 35 | if (self = [super initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT)]) { 36 | //背景色为clearColor 37 | self.backgroundColor = [UIColor clearColor]; 38 | self.origin = origin; 39 | self.height = height; 40 | self.width = width; 41 | self.direction = direction; 42 | self.dataArray = dataArray; 43 | if (height <= 0) { 44 | height = 44; 45 | } 46 | if (direction == kLrdOutputViewDirectionLeft) { 47 | self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(origin.x, origin.y, width, height * _dataArray.count) style:UITableViewStylePlain]; 48 | }else { 49 | self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(origin.x, origin.y, -width, height * _dataArray.count) style:UITableViewStylePlain]; 50 | } 51 | 52 | _tableView.separatorColor = [UIColor colorWithWhite:0.3 alpha:1]; 53 | _tableView.backgroundColor = [UIColor colorWithWhite:0.2 alpha:1]; 54 | _tableView.bounces = NO; 55 | _tableView.layer.cornerRadius = 2; 56 | _tableView.delegate = self; 57 | _tableView.dataSource = self; 58 | 59 | //注册cell 60 | [_tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"]; 61 | 62 | [self addSubview:self.tableView]; 63 | 64 | //cell线条 65 | if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) { 66 | [self.tableView setSeparatorInset:CellLineEdgeInsets]; 67 | } 68 | 69 | if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)]) { 70 | [self.tableView setLayoutMargins:CellLineEdgeInsets]; 71 | } 72 | } 73 | return self; 74 | } 75 | 76 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 77 | return self.dataArray.count; 78 | } 79 | 80 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 81 | return self.height; 82 | } 83 | 84 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 85 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"]; 86 | cell.textLabel.textColor = [UIColor whiteColor]; 87 | cell.textLabel.font = [UIFont systemFontOfSize:15]; 88 | cell.backgroundColor = [UIColor clearColor]; 89 | //取出模型 90 | LrdCellModel *model = [self.dataArray objectAtIndex:indexPath.row]; 91 | cell.textLabel.text = model.title; 92 | cell.imageView.image = [UIImage imageNamed:model.imageName]; 93 | cell.selectedBackgroundView = [[UIView alloc] initWithFrame:cell.frame]; 94 | cell.selectedBackgroundView.backgroundColor = [UIColor blackColor]; 95 | 96 | return cell; 97 | } 98 | 99 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 100 | //通知代理处理点击事件 101 | if ([self.delegate respondsToSelector:@selector(didSelectedAtIndexPath:)]) { 102 | [self.delegate didSelectedAtIndexPath:indexPath]; 103 | } 104 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 105 | [self dismiss]; 106 | } 107 | 108 | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 109 | if ([cell respondsToSelector:@selector(setSeparatorInset:)]) { 110 | [cell setSeparatorInset:CellLineEdgeInsets]; 111 | } 112 | if ([cell respondsToSelector:@selector(setLayoutMargins:)]) { 113 | [cell setLayoutMargins:CellLineEdgeInsets]; 114 | } 115 | } 116 | 117 | //画出尖尖 118 | - (void)drawRect:(CGRect)rect { 119 | //拿到当前视图准备好的画板 120 | CGContextRef context = UIGraphicsGetCurrentContext(); 121 | //利用path进行绘制三角形 122 | CGContextBeginPath(context);//标记 123 | 124 | if (self.direction == kLrdOutputViewDirectionLeft) { 125 | CGFloat startX = self.origin.x + 20; 126 | CGFloat startY = self.origin.y; 127 | CGContextMoveToPoint(context, startX, startY);//设置起点 128 | 129 | CGContextAddLineToPoint(context, startX + 5, startY - 5); 130 | 131 | CGContextAddLineToPoint(context, startX + 10, startY); 132 | }else { 133 | CGFloat startX = self.origin.x - 20; 134 | CGFloat startY = self.origin.y; 135 | CGContextMoveToPoint(context, startX, startY);//设置起点 136 | 137 | CGContextAddLineToPoint(context, startX + 5, startY - 5); 138 | 139 | CGContextAddLineToPoint(context, startX + 10, startY); 140 | } 141 | 142 | CGContextClosePath(context);//路径结束标志,不写默认封闭 143 | 144 | [self.tableView.backgroundColor setFill]; //设置填充色 145 | 146 | 147 | [self.tableView.backgroundColor setStroke]; 148 | 149 | CGContextDrawPath(context, kCGPathFillStroke);//绘制路径path 150 | 151 | 152 | } 153 | 154 | - (void)pop { 155 | UIWindow *keyWindow = [[UIApplication sharedApplication] keyWindow]; 156 | [keyWindow addSubview:self]; 157 | //动画效果弹出 158 | self.alpha = 0; 159 | CGRect frame = self.tableView.frame; 160 | self.tableView.frame = CGRectMake(self.origin.x, self.origin.y, 0, 0); 161 | [UIView animateWithDuration:0.2 animations:^{ 162 | self.alpha = 1; 163 | self.tableView.frame = frame; 164 | }]; 165 | } 166 | 167 | - (void)dismiss { 168 | //动画效果淡出 169 | [UIView animateWithDuration:0.2 animations:^{ 170 | self.alpha = 0; 171 | self.tableView.frame = CGRectMake(self.origin.x, self.origin.y, 0, 0); 172 | } completion:^(BOOL finished) { 173 | if (finished) { 174 | [self removeFromSuperview]; 175 | if (self.dismissOperation) { 176 | self.dismissOperation(); 177 | } 178 | } 179 | }]; 180 | } 181 | 182 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 183 | UITouch *touch = [touches anyObject]; 184 | if (![touch.view isEqual:self.tableView]) { 185 | [self dismiss]; 186 | } 187 | } 188 | 189 | @end 190 | 191 | 192 | #pragma mark - LrdCellModel 193 | 194 | @implementation LrdCellModel 195 | 196 | - (instancetype)initWithTitle:(NSString *)title imageName:(NSString *)imageName { 197 | LrdCellModel *model = [[LrdCellModel alloc] init]; 198 | model.title = title; 199 | model.imageName = imageName; 200 | return model; 201 | } 202 | 203 | @end 204 | -------------------------------------------------------------------------------- /LrdOutputView/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /LrdOutputView/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "LrdOutputView.h" 11 | 12 | @interface ViewController () 13 | 14 | @property (nonatomic, strong) NSArray *dataArr; 15 | @property (nonatomic, strong) LrdOutputView *outputView; 16 | 17 | @end 18 | 19 | @implementation ViewController 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | // Do any additional setup after loading the view, typically from a nib. 24 | //几个model 25 | LrdCellModel *one = [[LrdCellModel alloc] initWithTitle:@"附近学校" imageName:@"item_school"]; 26 | LrdCellModel *two = [[LrdCellModel alloc] initWithTitle:@"联赛流程" imageName:@"item_battle"]; 27 | LrdCellModel *three = [[LrdCellModel alloc] initWithTitle:@"其他联赛" imageName:@"item_list"]; 28 | LrdCellModel *four = [[LrdCellModel alloc] initWithTitle:@"校内群聊" imageName:@"item_chat"]; 29 | LrdCellModel *five = [[LrdCellModel alloc] initWithTitle:@"邀请好友" imageName:@"item_share"]; 30 | self.dataArr = @[one, two, three, four, five]; 31 | 32 | } 33 | 34 | - (IBAction)btnClicked:(UIButton *)btn{ 35 | if (btn.tag == 11) { 36 | CGFloat x = btn.center.x; 37 | CGFloat y = btn.frame.origin.y + btn.bounds.size.height + 10; 38 | 39 | _outputView = [[LrdOutputView alloc] initWithDataArray:self.dataArr origin:CGPointMake(x, y) width:125 height:44 direction:kLrdOutputViewDirectionLeft]; 40 | }else { 41 | CGFloat x = btn.center.x; 42 | CGFloat y = btn.frame.origin.y + btn.bounds.size.height + 10; 43 | _outputView = [[LrdOutputView alloc] initWithDataArray:self.dataArr origin:CGPointMake(x, y) width:125 height:44 direction:kLrdOutputViewDirectionRight]; 44 | } 45 | _outputView.delegate = self; 46 | _outputView.dismissOperation = ^(){ 47 | //设置成nil,以防内存泄露 48 | _outputView = nil; 49 | }; 50 | [_outputView pop]; 51 | } 52 | 53 | - (void)didSelectedAtIndexPath:(NSIndexPath *)indexPath { 54 | 55 | UIAlertController *alert=[UIAlertController alertControllerWithTitle:@"主人,别戳人家" message:[NSString stringWithFormat:@"你点击了%ld行", indexPath.row] preferredStyle:UIAlertControllerStyleAlert]; 56 | //创建一个action 57 | UIAlertAction *cancel=[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:nil]; 58 | [alert addAction:cancel]; 59 | [self presentViewController:alert animated:YES completion:nil]; 60 | } 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /LrdOutputView/image/item_battle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/item_battle@2x.png -------------------------------------------------------------------------------- /LrdOutputView/image/item_chat@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/item_chat@2x.png -------------------------------------------------------------------------------- /LrdOutputView/image/item_list@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/item_list@2x.png -------------------------------------------------------------------------------- /LrdOutputView/image/item_school@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/item_school@2x.png -------------------------------------------------------------------------------- /LrdOutputView/image/item_share@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/item_share@2x.png -------------------------------------------------------------------------------- /LrdOutputView/image/schoolListItem@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmallMonster77/LrdOutputView/c7656dc3229083004c51b6285e65e0c737775056/LrdOutputView/image/schoolListItem@2x.png -------------------------------------------------------------------------------- /LrdOutputView/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LrdOutputView 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. 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 | -------------------------------------------------------------------------------- /LrdOutputViewTests/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 | -------------------------------------------------------------------------------- /LrdOutputViewTests/LrdOutputViewTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LrdOutputViewTests.m 3 | // LrdOutputViewTests 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LrdOutputViewTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LrdOutputViewTests 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 | -------------------------------------------------------------------------------- /LrdOutputViewUITests/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 | -------------------------------------------------------------------------------- /LrdOutputViewUITests/LrdOutputViewUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // LrdOutputViewUITests.m 3 | // LrdOutputViewUITests 4 | // 5 | // Created by 键盘上的舞者 on 4/14/16. 6 | // Copyright © 2016 键盘上的舞者. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LrdOutputViewUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation LrdOutputViewUITests 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 | # LrdOutputView 2 | 仿微信,QQ弹出菜单视图,封装好,易调用 3 | 4 | 效果如图:
5 | ![](http://lrdup888.qiniudn.com/%E5%BC%B9%E5%87%BA%E8%8F%9C%E5%8D%95.gif) 6 | 7 | ## 使用方法
8 | ```Objective-C 9 | _outputView = [[LrdOutputView alloc] initWithDataArray:self.dataArr origin:CGPointMake(x, y) width:125 height:44 direction:kLrdOutputViewDirectionRight]; 10 | _outputView.delegate = self; 11 | _outputView.dismissOperation = ^(){ 12 | //设置成nil,以防内存泄露 13 | _outputView = nil; 14 | }; 15 | [_outputView pop]; 16 | ``` 17 | 18 | 具体方法请看Demo 19 | 20 | 喜欢就给颗星呗~ 21 | 22 | 我的博客地址:[我的博客](http://www.lrdup.net "键盘上的舞者") 23 | --------------------------------------------------------------------------------