├── BHBFreeBorder(OC) ├── BHBFreeBorder.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── bihongbo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── bihongbo.xcuserdatad │ │ └── xcschemes │ │ ├── BHBFreeBorder.xcscheme │ │ └── xcschememanagement.plist ├── BHBFreeBorder │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── UIView+FreeBorder.h │ ├── UIView+FreeBorder.m │ ├── ViewController.h │ ├── ViewController.m │ └── main.m ├── BHBFreeBorderTests │ ├── BHBFreeBorderTests.m │ └── Info.plist └── BHBFreeBorderUITests │ ├── BHBFreeBorderUITests.m │ └── Info.plist ├── BHBFreeBorder(swift) ├── BHBFreeBorder.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── bihongbo.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── bihongbo.xcuserdatad │ │ └── xcschemes │ │ ├── BHBFreeBorder.xcscheme │ │ └── xcschememanagement.plist ├── BHBFreeBorder │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── UIView+FreeBolder.swift │ └── ViewController.swift ├── BHBFreeBorderTests │ ├── BHBFreeBorderTests.swift │ └── Info.plist └── BHBFreeBorderUITests │ ├── BHBFreeBorderUITests.swift │ └── Info.plist └── README.md /BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F751C3201C338C3B00A7D2AB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C31F1C338C3B00A7D2AB /* main.m */; }; 11 | F751C3231C338C3B00A7D2AB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C3221C338C3B00A7D2AB /* AppDelegate.m */; }; 12 | F751C3261C338C3B00A7D2AB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C3251C338C3B00A7D2AB /* ViewController.m */; }; 13 | F751C3291C338C3B00A7D2AB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F751C3271C338C3B00A7D2AB /* Main.storyboard */; }; 14 | F751C32B1C338C3B00A7D2AB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F751C32A1C338C3B00A7D2AB /* Assets.xcassets */; }; 15 | F751C32E1C338C3B00A7D2AB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F751C32C1C338C3B00A7D2AB /* LaunchScreen.storyboard */; }; 16 | F751C3391C338C3B00A7D2AB /* BHBFreeBorderTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C3381C338C3B00A7D2AB /* BHBFreeBorderTests.m */; }; 17 | F751C3441C338C3B00A7D2AB /* BHBFreeBorderUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C3431C338C3B00A7D2AB /* BHBFreeBorderUITests.m */; }; 18 | F751C3531C33B40000A7D2AB /* UIView+FreeBorder.m in Sources */ = {isa = PBXBuildFile; fileRef = F751C3521C33B40000A7D2AB /* UIView+FreeBorder.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | F751C3351C338C3B00A7D2AB /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = F751C3131C338C3B00A7D2AB /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = F751C31A1C338C3B00A7D2AB; 27 | remoteInfo = BHBFreeBorder; 28 | }; 29 | F751C3401C338C3B00A7D2AB /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = F751C3131C338C3B00A7D2AB /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = F751C31A1C338C3B00A7D2AB; 34 | remoteInfo = BHBFreeBorder; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | F751C31B1C338C3B00A7D2AB /* BHBFreeBorder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BHBFreeBorder.app; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | F751C31F1C338C3B00A7D2AB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 41 | F751C3211C338C3B00A7D2AB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | F751C3221C338C3B00A7D2AB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | F751C3241C338C3B00A7D2AB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 44 | F751C3251C338C3B00A7D2AB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 45 | F751C3281C338C3B00A7D2AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 46 | F751C32A1C338C3B00A7D2AB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 47 | F751C32D1C338C3B00A7D2AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 48 | F751C32F1C338C3B00A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 49 | F751C3341C338C3B00A7D2AB /* BHBFreeBorderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBFreeBorderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | F751C3381C338C3B00A7D2AB /* BHBFreeBorderTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHBFreeBorderTests.m; sourceTree = ""; }; 51 | F751C33A1C338C3B00A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | F751C33F1C338C3B00A7D2AB /* BHBFreeBorderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBFreeBorderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | F751C3431C338C3B00A7D2AB /* BHBFreeBorderUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BHBFreeBorderUITests.m; sourceTree = ""; }; 54 | F751C3451C338C3B00A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | F751C3511C33B40000A7D2AB /* UIView+FreeBorder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+FreeBorder.h"; sourceTree = ""; }; 56 | F751C3521C33B40000A7D2AB /* UIView+FreeBorder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+FreeBorder.m"; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | F751C3181C338C3B00A7D2AB /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | F751C3311C338C3B00A7D2AB /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | F751C33C1C338C3B00A7D2AB /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | F751C3121C338C3B00A7D2AB = { 85 | isa = PBXGroup; 86 | children = ( 87 | F751C31D1C338C3B00A7D2AB /* BHBFreeBorder */, 88 | F751C3371C338C3B00A7D2AB /* BHBFreeBorderTests */, 89 | F751C3421C338C3B00A7D2AB /* BHBFreeBorderUITests */, 90 | F751C31C1C338C3B00A7D2AB /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | F751C31C1C338C3B00A7D2AB /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | F751C31B1C338C3B00A7D2AB /* BHBFreeBorder.app */, 98 | F751C3341C338C3B00A7D2AB /* BHBFreeBorderTests.xctest */, 99 | F751C33F1C338C3B00A7D2AB /* BHBFreeBorderUITests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | F751C31D1C338C3B00A7D2AB /* BHBFreeBorder */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | F751C3511C33B40000A7D2AB /* UIView+FreeBorder.h */, 108 | F751C3521C33B40000A7D2AB /* UIView+FreeBorder.m */, 109 | F751C3211C338C3B00A7D2AB /* AppDelegate.h */, 110 | F751C3221C338C3B00A7D2AB /* AppDelegate.m */, 111 | F751C3241C338C3B00A7D2AB /* ViewController.h */, 112 | F751C3251C338C3B00A7D2AB /* ViewController.m */, 113 | F751C3271C338C3B00A7D2AB /* Main.storyboard */, 114 | F751C32A1C338C3B00A7D2AB /* Assets.xcassets */, 115 | F751C32C1C338C3B00A7D2AB /* LaunchScreen.storyboard */, 116 | F751C32F1C338C3B00A7D2AB /* Info.plist */, 117 | F751C31E1C338C3B00A7D2AB /* Supporting Files */, 118 | ); 119 | path = BHBFreeBorder; 120 | sourceTree = ""; 121 | }; 122 | F751C31E1C338C3B00A7D2AB /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | F751C31F1C338C3B00A7D2AB /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | F751C3371C338C3B00A7D2AB /* BHBFreeBorderTests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | F751C3381C338C3B00A7D2AB /* BHBFreeBorderTests.m */, 134 | F751C33A1C338C3B00A7D2AB /* Info.plist */, 135 | ); 136 | path = BHBFreeBorderTests; 137 | sourceTree = ""; 138 | }; 139 | F751C3421C338C3B00A7D2AB /* BHBFreeBorderUITests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | F751C3431C338C3B00A7D2AB /* BHBFreeBorderUITests.m */, 143 | F751C3451C338C3B00A7D2AB /* Info.plist */, 144 | ); 145 | path = BHBFreeBorderUITests; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | F751C31A1C338C3B00A7D2AB /* BHBFreeBorder */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = F751C3481C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorder" */; 154 | buildPhases = ( 155 | F751C3171C338C3B00A7D2AB /* Sources */, 156 | F751C3181C338C3B00A7D2AB /* Frameworks */, 157 | F751C3191C338C3B00A7D2AB /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = BHBFreeBorder; 164 | productName = BHBFreeBorder; 165 | productReference = F751C31B1C338C3B00A7D2AB /* BHBFreeBorder.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | F751C3331C338C3B00A7D2AB /* BHBFreeBorderTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = F751C34B1C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderTests" */; 171 | buildPhases = ( 172 | F751C3301C338C3B00A7D2AB /* Sources */, 173 | F751C3311C338C3B00A7D2AB /* Frameworks */, 174 | F751C3321C338C3B00A7D2AB /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | F751C3361C338C3B00A7D2AB /* PBXTargetDependency */, 180 | ); 181 | name = BHBFreeBorderTests; 182 | productName = BHBFreeBorderTests; 183 | productReference = F751C3341C338C3B00A7D2AB /* BHBFreeBorderTests.xctest */; 184 | productType = "com.apple.product-type.bundle.unit-test"; 185 | }; 186 | F751C33E1C338C3B00A7D2AB /* BHBFreeBorderUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = F751C34E1C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderUITests" */; 189 | buildPhases = ( 190 | F751C33B1C338C3B00A7D2AB /* Sources */, 191 | F751C33C1C338C3B00A7D2AB /* Frameworks */, 192 | F751C33D1C338C3B00A7D2AB /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | F751C3411C338C3B00A7D2AB /* PBXTargetDependency */, 198 | ); 199 | name = BHBFreeBorderUITests; 200 | productName = BHBFreeBorderUITests; 201 | productReference = F751C33F1C338C3B00A7D2AB /* BHBFreeBorderUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | F751C3131C338C3B00A7D2AB /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0720; 211 | ORGANIZATIONNAME = bihongbo; 212 | TargetAttributes = { 213 | F751C31A1C338C3B00A7D2AB = { 214 | CreatedOnToolsVersion = 7.2; 215 | }; 216 | F751C3331C338C3B00A7D2AB = { 217 | CreatedOnToolsVersion = 7.2; 218 | TestTargetID = F751C31A1C338C3B00A7D2AB; 219 | }; 220 | F751C33E1C338C3B00A7D2AB = { 221 | CreatedOnToolsVersion = 7.2; 222 | TestTargetID = F751C31A1C338C3B00A7D2AB; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = F751C3161C338C3B00A7D2AB /* Build configuration list for PBXProject "BHBFreeBorder" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = English; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = F751C3121C338C3B00A7D2AB; 235 | productRefGroup = F751C31C1C338C3B00A7D2AB /* Products */; 236 | projectDirPath = ""; 237 | projectRoot = ""; 238 | targets = ( 239 | F751C31A1C338C3B00A7D2AB /* BHBFreeBorder */, 240 | F751C3331C338C3B00A7D2AB /* BHBFreeBorderTests */, 241 | F751C33E1C338C3B00A7D2AB /* BHBFreeBorderUITests */, 242 | ); 243 | }; 244 | /* End PBXProject section */ 245 | 246 | /* Begin PBXResourcesBuildPhase section */ 247 | F751C3191C338C3B00A7D2AB /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | F751C32E1C338C3B00A7D2AB /* LaunchScreen.storyboard in Resources */, 252 | F751C32B1C338C3B00A7D2AB /* Assets.xcassets in Resources */, 253 | F751C3291C338C3B00A7D2AB /* Main.storyboard in Resources */, 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | }; 257 | F751C3321C338C3B00A7D2AB /* Resources */ = { 258 | isa = PBXResourcesBuildPhase; 259 | buildActionMask = 2147483647; 260 | files = ( 261 | ); 262 | runOnlyForDeploymentPostprocessing = 0; 263 | }; 264 | F751C33D1C338C3B00A7D2AB /* Resources */ = { 265 | isa = PBXResourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | ); 269 | runOnlyForDeploymentPostprocessing = 0; 270 | }; 271 | /* End PBXResourcesBuildPhase section */ 272 | 273 | /* Begin PBXSourcesBuildPhase section */ 274 | F751C3171C338C3B00A7D2AB /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | F751C3261C338C3B00A7D2AB /* ViewController.m in Sources */, 279 | F751C3231C338C3B00A7D2AB /* AppDelegate.m in Sources */, 280 | F751C3531C33B40000A7D2AB /* UIView+FreeBorder.m in Sources */, 281 | F751C3201C338C3B00A7D2AB /* main.m in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | F751C3301C338C3B00A7D2AB /* Sources */ = { 286 | isa = PBXSourcesBuildPhase; 287 | buildActionMask = 2147483647; 288 | files = ( 289 | F751C3391C338C3B00A7D2AB /* BHBFreeBorderTests.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | F751C33B1C338C3B00A7D2AB /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | F751C3441C338C3B00A7D2AB /* BHBFreeBorderUITests.m in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | /* End PBXSourcesBuildPhase section */ 302 | 303 | /* Begin PBXTargetDependency section */ 304 | F751C3361C338C3B00A7D2AB /* PBXTargetDependency */ = { 305 | isa = PBXTargetDependency; 306 | target = F751C31A1C338C3B00A7D2AB /* BHBFreeBorder */; 307 | targetProxy = F751C3351C338C3B00A7D2AB /* PBXContainerItemProxy */; 308 | }; 309 | F751C3411C338C3B00A7D2AB /* PBXTargetDependency */ = { 310 | isa = PBXTargetDependency; 311 | target = F751C31A1C338C3B00A7D2AB /* BHBFreeBorder */; 312 | targetProxy = F751C3401C338C3B00A7D2AB /* PBXContainerItemProxy */; 313 | }; 314 | /* End PBXTargetDependency section */ 315 | 316 | /* Begin PBXVariantGroup section */ 317 | F751C3271C338C3B00A7D2AB /* Main.storyboard */ = { 318 | isa = PBXVariantGroup; 319 | children = ( 320 | F751C3281C338C3B00A7D2AB /* Base */, 321 | ); 322 | name = Main.storyboard; 323 | sourceTree = ""; 324 | }; 325 | F751C32C1C338C3B00A7D2AB /* LaunchScreen.storyboard */ = { 326 | isa = PBXVariantGroup; 327 | children = ( 328 | F751C32D1C338C3B00A7D2AB /* Base */, 329 | ); 330 | name = LaunchScreen.storyboard; 331 | sourceTree = ""; 332 | }; 333 | /* End PBXVariantGroup section */ 334 | 335 | /* Begin XCBuildConfiguration section */ 336 | F751C3461C338C3B00A7D2AB /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | buildSettings = { 339 | ALWAYS_SEARCH_USER_PATHS = NO; 340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 341 | CLANG_CXX_LIBRARY = "libc++"; 342 | CLANG_ENABLE_MODULES = YES; 343 | CLANG_ENABLE_OBJC_ARC = YES; 344 | CLANG_WARN_BOOL_CONVERSION = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 347 | CLANG_WARN_EMPTY_BODY = YES; 348 | CLANG_WARN_ENUM_CONVERSION = YES; 349 | CLANG_WARN_INT_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_UNREACHABLE_CODE = YES; 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 353 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 354 | COPY_PHASE_STRIP = NO; 355 | DEBUG_INFORMATION_FORMAT = dwarf; 356 | ENABLE_STRICT_OBJC_MSGSEND = YES; 357 | ENABLE_TESTABILITY = YES; 358 | GCC_C_LANGUAGE_STANDARD = gnu99; 359 | GCC_DYNAMIC_NO_PIC = NO; 360 | GCC_NO_COMMON_BLOCKS = YES; 361 | GCC_OPTIMIZATION_LEVEL = 0; 362 | GCC_PREPROCESSOR_DEFINITIONS = ( 363 | "DEBUG=1", 364 | "$(inherited)", 365 | ); 366 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 368 | GCC_WARN_UNDECLARED_SELECTOR = YES; 369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 370 | GCC_WARN_UNUSED_FUNCTION = YES; 371 | GCC_WARN_UNUSED_VARIABLE = YES; 372 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 373 | MTL_ENABLE_DEBUG_INFO = YES; 374 | ONLY_ACTIVE_ARCH = YES; 375 | SDKROOT = iphoneos; 376 | }; 377 | name = Debug; 378 | }; 379 | F751C3471C338C3B00A7D2AB /* Release */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ALWAYS_SEARCH_USER_PATHS = NO; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_EMPTY_BODY = YES; 391 | CLANG_WARN_ENUM_CONVERSION = YES; 392 | CLANG_WARN_INT_CONVERSION = YES; 393 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 394 | CLANG_WARN_UNREACHABLE_CODE = YES; 395 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 397 | COPY_PHASE_STRIP = NO; 398 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 399 | ENABLE_NS_ASSERTIONS = NO; 400 | ENABLE_STRICT_OBJC_MSGSEND = YES; 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_NO_COMMON_BLOCKS = YES; 403 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 404 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 405 | GCC_WARN_UNDECLARED_SELECTOR = YES; 406 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 407 | GCC_WARN_UNUSED_FUNCTION = YES; 408 | GCC_WARN_UNUSED_VARIABLE = YES; 409 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 410 | MTL_ENABLE_DEBUG_INFO = NO; 411 | SDKROOT = iphoneos; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | F751C3491C338C3B00A7D2AB /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 420 | INFOPLIST_FILE = BHBFreeBorder/Info.plist; 421 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 422 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorder; 423 | PRODUCT_NAME = "$(TARGET_NAME)"; 424 | }; 425 | name = Debug; 426 | }; 427 | F751C34A1C338C3B00A7D2AB /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | buildSettings = { 430 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 431 | INFOPLIST_FILE = BHBFreeBorder/Info.plist; 432 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 433 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorder; 434 | PRODUCT_NAME = "$(TARGET_NAME)"; 435 | }; 436 | name = Release; 437 | }; 438 | F751C34C1C338C3B00A7D2AB /* Debug */ = { 439 | isa = XCBuildConfiguration; 440 | buildSettings = { 441 | BUNDLE_LOADER = "$(TEST_HOST)"; 442 | INFOPLIST_FILE = BHBFreeBorderTests/Info.plist; 443 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 444 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderTests; 445 | PRODUCT_NAME = "$(TARGET_NAME)"; 446 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBFreeBorder.app/BHBFreeBorder"; 447 | }; 448 | name = Debug; 449 | }; 450 | F751C34D1C338C3B00A7D2AB /* Release */ = { 451 | isa = XCBuildConfiguration; 452 | buildSettings = { 453 | BUNDLE_LOADER = "$(TEST_HOST)"; 454 | INFOPLIST_FILE = BHBFreeBorderTests/Info.plist; 455 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 456 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderTests; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBFreeBorder.app/BHBFreeBorder"; 459 | }; 460 | name = Release; 461 | }; 462 | F751C34F1C338C3B00A7D2AB /* Debug */ = { 463 | isa = XCBuildConfiguration; 464 | buildSettings = { 465 | INFOPLIST_FILE = BHBFreeBorderUITests/Info.plist; 466 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 467 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderUITests; 468 | PRODUCT_NAME = "$(TARGET_NAME)"; 469 | TEST_TARGET_NAME = BHBFreeBorder; 470 | USES_XCTRUNNER = YES; 471 | }; 472 | name = Debug; 473 | }; 474 | F751C3501C338C3B00A7D2AB /* Release */ = { 475 | isa = XCBuildConfiguration; 476 | buildSettings = { 477 | INFOPLIST_FILE = BHBFreeBorderUITests/Info.plist; 478 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 479 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderUITests; 480 | PRODUCT_NAME = "$(TARGET_NAME)"; 481 | TEST_TARGET_NAME = BHBFreeBorder; 482 | USES_XCTRUNNER = YES; 483 | }; 484 | name = Release; 485 | }; 486 | /* End XCBuildConfiguration section */ 487 | 488 | /* Begin XCConfigurationList section */ 489 | F751C3161C338C3B00A7D2AB /* Build configuration list for PBXProject "BHBFreeBorder" */ = { 490 | isa = XCConfigurationList; 491 | buildConfigurations = ( 492 | F751C3461C338C3B00A7D2AB /* Debug */, 493 | F751C3471C338C3B00A7D2AB /* Release */, 494 | ); 495 | defaultConfigurationIsVisible = 0; 496 | defaultConfigurationName = Release; 497 | }; 498 | F751C3481C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorder" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | F751C3491C338C3B00A7D2AB /* Debug */, 502 | F751C34A1C338C3B00A7D2AB /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | F751C34B1C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderTests" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | F751C34C1C338C3B00A7D2AB /* Debug */, 511 | F751C34D1C338C3B00A7D2AB /* Release */, 512 | ); 513 | defaultConfigurationIsVisible = 0; 514 | defaultConfigurationName = Release; 515 | }; 516 | F751C34E1C338C3B00A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderUITests" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | F751C34F1C338C3B00A7D2AB /* Debug */, 520 | F751C3501C338C3B00A7D2AB /* Release */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | defaultConfigurationName = Release; 524 | }; 525 | /* End XCConfigurationList section */ 526 | }; 527 | rootObject = F751C3131C338C3B00A7D2AB /* Project object */; 528 | } 529 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bb-coder/BHBFreeBorder/8f1b7273a20a0dd0aaabff38088c4eeaf1ca427e/BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/BHBFreeBorder.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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BHBFreeBorder.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F751C31A1C338C3B00A7D2AB 16 | 17 | primary 18 | 19 | 20 | F751C3331C338C3B00A7D2AB 21 | 22 | primary 23 | 24 | 25 | F751C33E1C338C3B00A7D2AB 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. 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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. 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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/UIView+FreeBorder.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+FreeBorder.h 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef enum : NSUInteger { 12 | BorderTypeTop, 13 | BorderTypeLeft, 14 | BorderTypeRight, 15 | BorderTypeBottom 16 | } BorderType; 17 | 18 | 19 | @interface UIView (FreeBorder) 20 | 21 | - (void)addBorderWithColor:(UIColor *)color size:(CGFloat)size borderTypes:(NSArray *)types; 22 | 23 | - (void)addBorderLayerWithColor:(UIColor *)color size:(CGFloat)size borderType:(BorderType)boderType; 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/UIView+FreeBorder.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+FreeBorder.m 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import "UIView+FreeBorder.h" 10 | 11 | @implementation UIView (FreeBorder) 12 | 13 | - (void)addBorderWithColor:(UIColor *)color size:(CGFloat)size borderTypes:(NSArray *)types{ 14 | for (int i = 0 ; i < types.count; i ++) { 15 | [self addBorderLayerWithColor:color size:size borderType:[types[i] integerValue]]; 16 | } 17 | } 18 | 19 | - (void)addBorderLayerWithColor:(UIColor *)color size:(CGFloat)size borderType:(BorderType)boderType{ 20 | CALayer * layer = [CALayer layer]; 21 | layer.backgroundColor = color.CGColor; 22 | [self.layer addSublayer:layer]; 23 | 24 | switch (boderType) { 25 | case BorderTypeTop: 26 | layer.frame = CGRectMake(0, 0, self.frame.size.width, size); 27 | break; 28 | case BorderTypeLeft: 29 | layer.frame = CGRectMake(0, 0, size, self.frame.size.height); 30 | break; 31 | case BorderTypeBottom: 32 | layer.frame = CGRectMake(0, self.frame.size.height - size, self.frame.size.width, size); 33 | break; 34 | case BorderTypeRight: 35 | layer.frame = CGRectMake(self.frame.size.width - size, 0, size, self.frame.size.height); 36 | break; 37 | default: 38 | break; 39 | } 40 | 41 | } 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "UIView+FreeBorder.h" 11 | 12 | @interface ViewController () 13 | 14 | @end 15 | 16 | @implementation ViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | 21 | /// 下上左边框 22 | UILabel * lbl = [[UILabel alloc] init]; 23 | lbl.frame = CGRectMake(50, 50, 100, 50); 24 | [self.view addSubview:lbl]; 25 | [lbl addBorderWithColor:[UIColor redColor] size:1 borderTypes:@[@(BorderTypeBottom),@(BorderTypeTop),@(BorderTypeLeft)]]; 26 | 27 | /// 下上右边框 28 | UILabel * lbl1 = [[UILabel alloc] init]; 29 | lbl1.frame = CGRectMake(50, 150, 100, 50); 30 | [self.view addSubview:lbl1]; 31 | [lbl1 addBorderWithColor:[UIColor redColor] size:1 borderTypes:@[@(BorderTypeBottom),@(BorderTypeTop),@(BorderTypeRight)]]; 32 | 33 | /// 单根边框 34 | UILabel * lbl2 = [[UILabel alloc] init]; 35 | lbl2.frame = CGRectMake(50, 250, 100, 50); 36 | [self.view addSubview:lbl2]; 37 | [lbl2 addBorderLayerWithColor:[UIColor greenColor] size:1 borderType:BorderTypeRight]; 38 | 39 | 40 | } 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorder/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. 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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorderTests/BHBFreeBorderTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BHBFreeBorderTests.m 3 | // BHBFreeBorderTests 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BHBFreeBorderTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BHBFreeBorderTests 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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorderTests/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorderUITests/BHBFreeBorderUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // BHBFreeBorderUITests.m 3 | // BHBFreeBorderUITests 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BHBFreeBorderUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation BHBFreeBorderUITests 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 | -------------------------------------------------------------------------------- /BHBFreeBorder(OC)/BHBFreeBorderUITests/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | F751C2E31C337D1800A7D2AB /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F751C2E21C337D1800A7D2AB /* AppDelegate.swift */; }; 11 | F751C2E51C337D1800A7D2AB /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F751C2E41C337D1800A7D2AB /* ViewController.swift */; }; 12 | F751C2E81C337D1800A7D2AB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F751C2E61C337D1800A7D2AB /* Main.storyboard */; }; 13 | F751C2EA1C337D1800A7D2AB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = F751C2E91C337D1800A7D2AB /* Assets.xcassets */; }; 14 | F751C2ED1C337D1800A7D2AB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F751C2EB1C337D1800A7D2AB /* LaunchScreen.storyboard */; }; 15 | F751C2F81C337D1800A7D2AB /* BHBFreeBorderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F751C2F71C337D1800A7D2AB /* BHBFreeBorderTests.swift */; }; 16 | F751C3031C337D1800A7D2AB /* BHBFreeBorderUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = F751C3021C337D1800A7D2AB /* BHBFreeBorderUITests.swift */; }; 17 | F751C3111C337D3800A7D2AB /* UIView+FreeBolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F751C3101C337D3800A7D2AB /* UIView+FreeBolder.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | F751C2F41C337D1800A7D2AB /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = F751C2D71C337D1800A7D2AB /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = F751C2DE1C337D1800A7D2AB; 26 | remoteInfo = BHBFreeBorder; 27 | }; 28 | F751C2FF1C337D1800A7D2AB /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = F751C2D71C337D1800A7D2AB /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = F751C2DE1C337D1800A7D2AB; 33 | remoteInfo = BHBFreeBorder; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | F751C2DF1C337D1800A7D2AB /* BHBFreeBorder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = BHBFreeBorder.app; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | F751C2E21C337D1800A7D2AB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | F751C2E41C337D1800A7D2AB /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 41 | F751C2E71C337D1800A7D2AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | F751C2E91C337D1800A7D2AB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | F751C2EC1C337D1800A7D2AB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | F751C2EE1C337D1800A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | F751C2F31C337D1800A7D2AB /* BHBFreeBorderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBFreeBorderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | F751C2F71C337D1800A7D2AB /* BHBFreeBorderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BHBFreeBorderTests.swift; sourceTree = ""; }; 47 | F751C2F91C337D1800A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | F751C2FE1C337D1800A7D2AB /* BHBFreeBorderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = BHBFreeBorderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | F751C3021C337D1800A7D2AB /* BHBFreeBorderUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BHBFreeBorderUITests.swift; sourceTree = ""; }; 50 | F751C3041C337D1800A7D2AB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | F751C3101C337D3800A7D2AB /* UIView+FreeBolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+FreeBolder.swift"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | F751C2DC1C337D1800A7D2AB /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | F751C2F01C337D1800A7D2AB /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | F751C2FB1C337D1800A7D2AB /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | F751C2D61C337D1800A7D2AB = { 80 | isa = PBXGroup; 81 | children = ( 82 | F751C2E11C337D1800A7D2AB /* BHBFreeBorder */, 83 | F751C2F61C337D1800A7D2AB /* BHBFreeBorderTests */, 84 | F751C3011C337D1800A7D2AB /* BHBFreeBorderUITests */, 85 | F751C2E01C337D1800A7D2AB /* Products */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | F751C2E01C337D1800A7D2AB /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | F751C2DF1C337D1800A7D2AB /* BHBFreeBorder.app */, 93 | F751C2F31C337D1800A7D2AB /* BHBFreeBorderTests.xctest */, 94 | F751C2FE1C337D1800A7D2AB /* BHBFreeBorderUITests.xctest */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | F751C2E11C337D1800A7D2AB /* BHBFreeBorder */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | F751C3101C337D3800A7D2AB /* UIView+FreeBolder.swift */, 103 | F751C2E21C337D1800A7D2AB /* AppDelegate.swift */, 104 | F751C2E41C337D1800A7D2AB /* ViewController.swift */, 105 | F751C2E61C337D1800A7D2AB /* Main.storyboard */, 106 | F751C2E91C337D1800A7D2AB /* Assets.xcassets */, 107 | F751C2EB1C337D1800A7D2AB /* LaunchScreen.storyboard */, 108 | F751C2EE1C337D1800A7D2AB /* Info.plist */, 109 | ); 110 | path = BHBFreeBorder; 111 | sourceTree = ""; 112 | }; 113 | F751C2F61C337D1800A7D2AB /* BHBFreeBorderTests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | F751C2F71C337D1800A7D2AB /* BHBFreeBorderTests.swift */, 117 | F751C2F91C337D1800A7D2AB /* Info.plist */, 118 | ); 119 | path = BHBFreeBorderTests; 120 | sourceTree = ""; 121 | }; 122 | F751C3011C337D1800A7D2AB /* BHBFreeBorderUITests */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | F751C3021C337D1800A7D2AB /* BHBFreeBorderUITests.swift */, 126 | F751C3041C337D1800A7D2AB /* Info.plist */, 127 | ); 128 | path = BHBFreeBorderUITests; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | F751C2DE1C337D1800A7D2AB /* BHBFreeBorder */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = F751C3071C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorder" */; 137 | buildPhases = ( 138 | F751C2DB1C337D1800A7D2AB /* Sources */, 139 | F751C2DC1C337D1800A7D2AB /* Frameworks */, 140 | F751C2DD1C337D1800A7D2AB /* Resources */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | ); 146 | name = BHBFreeBorder; 147 | productName = BHBFreeBorder; 148 | productReference = F751C2DF1C337D1800A7D2AB /* BHBFreeBorder.app */; 149 | productType = "com.apple.product-type.application"; 150 | }; 151 | F751C2F21C337D1800A7D2AB /* BHBFreeBorderTests */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = F751C30A1C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderTests" */; 154 | buildPhases = ( 155 | F751C2EF1C337D1800A7D2AB /* Sources */, 156 | F751C2F01C337D1800A7D2AB /* Frameworks */, 157 | F751C2F11C337D1800A7D2AB /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | F751C2F51C337D1800A7D2AB /* PBXTargetDependency */, 163 | ); 164 | name = BHBFreeBorderTests; 165 | productName = BHBFreeBorderTests; 166 | productReference = F751C2F31C337D1800A7D2AB /* BHBFreeBorderTests.xctest */; 167 | productType = "com.apple.product-type.bundle.unit-test"; 168 | }; 169 | F751C2FD1C337D1800A7D2AB /* BHBFreeBorderUITests */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = F751C30D1C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderUITests" */; 172 | buildPhases = ( 173 | F751C2FA1C337D1800A7D2AB /* Sources */, 174 | F751C2FB1C337D1800A7D2AB /* Frameworks */, 175 | F751C2FC1C337D1800A7D2AB /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | F751C3001C337D1800A7D2AB /* PBXTargetDependency */, 181 | ); 182 | name = BHBFreeBorderUITests; 183 | productName = BHBFreeBorderUITests; 184 | productReference = F751C2FE1C337D1800A7D2AB /* BHBFreeBorderUITests.xctest */; 185 | productType = "com.apple.product-type.bundle.ui-testing"; 186 | }; 187 | /* End PBXNativeTarget section */ 188 | 189 | /* Begin PBXProject section */ 190 | F751C2D71C337D1800A7D2AB /* Project object */ = { 191 | isa = PBXProject; 192 | attributes = { 193 | LastSwiftUpdateCheck = 0720; 194 | LastUpgradeCheck = 0720; 195 | ORGANIZATIONNAME = bihongbo; 196 | TargetAttributes = { 197 | F751C2DE1C337D1800A7D2AB = { 198 | CreatedOnToolsVersion = 7.2; 199 | }; 200 | F751C2F21C337D1800A7D2AB = { 201 | CreatedOnToolsVersion = 7.2; 202 | TestTargetID = F751C2DE1C337D1800A7D2AB; 203 | }; 204 | F751C2FD1C337D1800A7D2AB = { 205 | CreatedOnToolsVersion = 7.2; 206 | TestTargetID = F751C2DE1C337D1800A7D2AB; 207 | }; 208 | }; 209 | }; 210 | buildConfigurationList = F751C2DA1C337D1800A7D2AB /* Build configuration list for PBXProject "BHBFreeBorder" */; 211 | compatibilityVersion = "Xcode 3.2"; 212 | developmentRegion = English; 213 | hasScannedForEncodings = 0; 214 | knownRegions = ( 215 | en, 216 | Base, 217 | ); 218 | mainGroup = F751C2D61C337D1800A7D2AB; 219 | productRefGroup = F751C2E01C337D1800A7D2AB /* Products */; 220 | projectDirPath = ""; 221 | projectRoot = ""; 222 | targets = ( 223 | F751C2DE1C337D1800A7D2AB /* BHBFreeBorder */, 224 | F751C2F21C337D1800A7D2AB /* BHBFreeBorderTests */, 225 | F751C2FD1C337D1800A7D2AB /* BHBFreeBorderUITests */, 226 | ); 227 | }; 228 | /* End PBXProject section */ 229 | 230 | /* Begin PBXResourcesBuildPhase section */ 231 | F751C2DD1C337D1800A7D2AB /* Resources */ = { 232 | isa = PBXResourcesBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | F751C2ED1C337D1800A7D2AB /* LaunchScreen.storyboard in Resources */, 236 | F751C2EA1C337D1800A7D2AB /* Assets.xcassets in Resources */, 237 | F751C2E81C337D1800A7D2AB /* Main.storyboard in Resources */, 238 | ); 239 | runOnlyForDeploymentPostprocessing = 0; 240 | }; 241 | F751C2F11C337D1800A7D2AB /* Resources */ = { 242 | isa = PBXResourcesBuildPhase; 243 | buildActionMask = 2147483647; 244 | files = ( 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | F751C2FC1C337D1800A7D2AB /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | ); 253 | runOnlyForDeploymentPostprocessing = 0; 254 | }; 255 | /* End PBXResourcesBuildPhase section */ 256 | 257 | /* Begin PBXSourcesBuildPhase section */ 258 | F751C2DB1C337D1800A7D2AB /* Sources */ = { 259 | isa = PBXSourcesBuildPhase; 260 | buildActionMask = 2147483647; 261 | files = ( 262 | F751C3111C337D3800A7D2AB /* UIView+FreeBolder.swift in Sources */, 263 | F751C2E51C337D1800A7D2AB /* ViewController.swift in Sources */, 264 | F751C2E31C337D1800A7D2AB /* AppDelegate.swift in Sources */, 265 | ); 266 | runOnlyForDeploymentPostprocessing = 0; 267 | }; 268 | F751C2EF1C337D1800A7D2AB /* Sources */ = { 269 | isa = PBXSourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | F751C2F81C337D1800A7D2AB /* BHBFreeBorderTests.swift in Sources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | F751C2FA1C337D1800A7D2AB /* Sources */ = { 277 | isa = PBXSourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | F751C3031C337D1800A7D2AB /* BHBFreeBorderUITests.swift in Sources */, 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | /* End PBXSourcesBuildPhase section */ 285 | 286 | /* Begin PBXTargetDependency section */ 287 | F751C2F51C337D1800A7D2AB /* PBXTargetDependency */ = { 288 | isa = PBXTargetDependency; 289 | target = F751C2DE1C337D1800A7D2AB /* BHBFreeBorder */; 290 | targetProxy = F751C2F41C337D1800A7D2AB /* PBXContainerItemProxy */; 291 | }; 292 | F751C3001C337D1800A7D2AB /* PBXTargetDependency */ = { 293 | isa = PBXTargetDependency; 294 | target = F751C2DE1C337D1800A7D2AB /* BHBFreeBorder */; 295 | targetProxy = F751C2FF1C337D1800A7D2AB /* PBXContainerItemProxy */; 296 | }; 297 | /* End PBXTargetDependency section */ 298 | 299 | /* Begin PBXVariantGroup section */ 300 | F751C2E61C337D1800A7D2AB /* Main.storyboard */ = { 301 | isa = PBXVariantGroup; 302 | children = ( 303 | F751C2E71C337D1800A7D2AB /* Base */, 304 | ); 305 | name = Main.storyboard; 306 | sourceTree = ""; 307 | }; 308 | F751C2EB1C337D1800A7D2AB /* LaunchScreen.storyboard */ = { 309 | isa = PBXVariantGroup; 310 | children = ( 311 | F751C2EC1C337D1800A7D2AB /* Base */, 312 | ); 313 | name = LaunchScreen.storyboard; 314 | sourceTree = ""; 315 | }; 316 | /* End PBXVariantGroup section */ 317 | 318 | /* Begin XCBuildConfiguration section */ 319 | F751C3051C337D1800A7D2AB /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | buildSettings = { 322 | ALWAYS_SEARCH_USER_PATHS = NO; 323 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 324 | CLANG_CXX_LIBRARY = "libc++"; 325 | CLANG_ENABLE_MODULES = YES; 326 | CLANG_ENABLE_OBJC_ARC = YES; 327 | CLANG_WARN_BOOL_CONVERSION = YES; 328 | CLANG_WARN_CONSTANT_CONVERSION = YES; 329 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 330 | CLANG_WARN_EMPTY_BODY = YES; 331 | CLANG_WARN_ENUM_CONVERSION = YES; 332 | CLANG_WARN_INT_CONVERSION = YES; 333 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 334 | CLANG_WARN_UNREACHABLE_CODE = YES; 335 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 336 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 337 | COPY_PHASE_STRIP = NO; 338 | DEBUG_INFORMATION_FORMAT = dwarf; 339 | ENABLE_STRICT_OBJC_MSGSEND = YES; 340 | ENABLE_TESTABILITY = YES; 341 | GCC_C_LANGUAGE_STANDARD = gnu99; 342 | GCC_DYNAMIC_NO_PIC = NO; 343 | GCC_NO_COMMON_BLOCKS = YES; 344 | GCC_OPTIMIZATION_LEVEL = 0; 345 | GCC_PREPROCESSOR_DEFINITIONS = ( 346 | "DEBUG=1", 347 | "$(inherited)", 348 | ); 349 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 350 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 351 | GCC_WARN_UNDECLARED_SELECTOR = YES; 352 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 353 | GCC_WARN_UNUSED_FUNCTION = YES; 354 | GCC_WARN_UNUSED_VARIABLE = YES; 355 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 356 | MTL_ENABLE_DEBUG_INFO = YES; 357 | ONLY_ACTIVE_ARCH = YES; 358 | SDKROOT = iphoneos; 359 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 360 | }; 361 | name = Debug; 362 | }; 363 | F751C3061C337D1800A7D2AB /* Release */ = { 364 | isa = XCBuildConfiguration; 365 | buildSettings = { 366 | ALWAYS_SEARCH_USER_PATHS = NO; 367 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 368 | CLANG_CXX_LIBRARY = "libc++"; 369 | CLANG_ENABLE_MODULES = YES; 370 | CLANG_ENABLE_OBJC_ARC = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_CONSTANT_CONVERSION = YES; 373 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 374 | CLANG_WARN_EMPTY_BODY = YES; 375 | CLANG_WARN_ENUM_CONVERSION = YES; 376 | CLANG_WARN_INT_CONVERSION = YES; 377 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 378 | CLANG_WARN_UNREACHABLE_CODE = YES; 379 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 380 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 381 | COPY_PHASE_STRIP = NO; 382 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 383 | ENABLE_NS_ASSERTIONS = NO; 384 | ENABLE_STRICT_OBJC_MSGSEND = YES; 385 | GCC_C_LANGUAGE_STANDARD = gnu99; 386 | GCC_NO_COMMON_BLOCKS = YES; 387 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 388 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 389 | GCC_WARN_UNDECLARED_SELECTOR = YES; 390 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 391 | GCC_WARN_UNUSED_FUNCTION = YES; 392 | GCC_WARN_UNUSED_VARIABLE = YES; 393 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 394 | MTL_ENABLE_DEBUG_INFO = NO; 395 | SDKROOT = iphoneos; 396 | VALIDATE_PRODUCT = YES; 397 | }; 398 | name = Release; 399 | }; 400 | F751C3081C337D1800A7D2AB /* Debug */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 404 | INFOPLIST_FILE = BHBFreeBorder/Info.plist; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 406 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorder; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | }; 409 | name = Debug; 410 | }; 411 | F751C3091C337D1800A7D2AB /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 415 | INFOPLIST_FILE = BHBFreeBorder/Info.plist; 416 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 417 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorder; 418 | PRODUCT_NAME = "$(TARGET_NAME)"; 419 | }; 420 | name = Release; 421 | }; 422 | F751C30B1C337D1800A7D2AB /* Debug */ = { 423 | isa = XCBuildConfiguration; 424 | buildSettings = { 425 | BUNDLE_LOADER = "$(TEST_HOST)"; 426 | INFOPLIST_FILE = BHBFreeBorderTests/Info.plist; 427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 428 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderTests; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBFreeBorder.app/BHBFreeBorder"; 431 | }; 432 | name = Debug; 433 | }; 434 | F751C30C1C337D1800A7D2AB /* Release */ = { 435 | isa = XCBuildConfiguration; 436 | buildSettings = { 437 | BUNDLE_LOADER = "$(TEST_HOST)"; 438 | INFOPLIST_FILE = BHBFreeBorderTests/Info.plist; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderTests; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/BHBFreeBorder.app/BHBFreeBorder"; 443 | }; 444 | name = Release; 445 | }; 446 | F751C30E1C337D1800A7D2AB /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | INFOPLIST_FILE = BHBFreeBorderUITests/Info.plist; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 451 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderUITests; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | TEST_TARGET_NAME = BHBFreeBorder; 454 | USES_XCTRUNNER = YES; 455 | }; 456 | name = Debug; 457 | }; 458 | F751C30F1C337D1800A7D2AB /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | INFOPLIST_FILE = BHBFreeBorderUITests/Info.plist; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 463 | PRODUCT_BUNDLE_IDENTIFIER = com.bhb.BHBFreeBorderUITests; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | TEST_TARGET_NAME = BHBFreeBorder; 466 | USES_XCTRUNNER = YES; 467 | }; 468 | name = Release; 469 | }; 470 | /* End XCBuildConfiguration section */ 471 | 472 | /* Begin XCConfigurationList section */ 473 | F751C2DA1C337D1800A7D2AB /* Build configuration list for PBXProject "BHBFreeBorder" */ = { 474 | isa = XCConfigurationList; 475 | buildConfigurations = ( 476 | F751C3051C337D1800A7D2AB /* Debug */, 477 | F751C3061C337D1800A7D2AB /* Release */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | F751C3071C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorder" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | F751C3081C337D1800A7D2AB /* Debug */, 486 | F751C3091C337D1800A7D2AB /* Release */, 487 | ); 488 | defaultConfigurationIsVisible = 0; 489 | }; 490 | F751C30A1C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderTests" */ = { 491 | isa = XCConfigurationList; 492 | buildConfigurations = ( 493 | F751C30B1C337D1800A7D2AB /* Debug */, 494 | F751C30C1C337D1800A7D2AB /* Release */, 495 | ); 496 | defaultConfigurationIsVisible = 0; 497 | }; 498 | F751C30D1C337D1800A7D2AB /* Build configuration list for PBXNativeTarget "BHBFreeBorderUITests" */ = { 499 | isa = XCConfigurationList; 500 | buildConfigurations = ( 501 | F751C30E1C337D1800A7D2AB /* Debug */, 502 | F751C30F1C337D1800A7D2AB /* Release */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | }; 506 | /* End XCConfigurationList section */ 507 | }; 508 | rootObject = F751C2D71C337D1800A7D2AB /* Project object */; 509 | } 510 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bb-coder/BHBFreeBorder/8f1b7273a20a0dd0aaabff38088c4eeaf1ca427e/BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/project.xcworkspace/xcuserdata/bihongbo.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/BHBFreeBorder.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 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder.xcodeproj/xcuserdata/bihongbo.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | BHBFreeBorder.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | F751C2DE1C337D1800A7D2AB 16 | 17 | primary 18 | 19 | 20 | F751C2F21C337D1800A7D2AB 21 | 22 | primary 23 | 24 | 25 | F751C2FD1C337D1800A7D2AB 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/UIView+FreeBolder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+FreeBolder.swift 3 | // daydays 4 | // 5 | // Created by bihongbo on 9/14/15. 6 | // Copyright (c) 2015 daydays. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | @objc enum BorderType:NSInteger{ 13 | 14 | case top,left,bottom,right 15 | 16 | } 17 | extension UIView{ 18 | 19 | // MARK: - 为视图加上边框 ,枚举数组可以填充上下左右四个边 20 | @objc func addBorder(color: UIColor?, size: CGFloat, borderTypes:NSArray){ 21 | 22 | var currentColor:UIColor? 23 | 24 | if let _ = color{ 25 | currentColor = color 26 | }else{ 27 | currentColor = UIColor.blackColor() 28 | } 29 | 30 | for borderType in borderTypes{ 31 | let bt: NSNumber = borderType as! NSNumber 32 | self.addBorderLayer(currentColor!, size: size, boderType: BorderType(rawValue: bt.integerValue)!) 33 | } 34 | 35 | } 36 | 37 | @objc func addBorderLayer(color: UIColor, size: CGFloat, boderType: BorderType){ 38 | 39 | let layer:CALayer = CALayer() 40 | layer.backgroundColor = color.CGColor 41 | self.layer.addSublayer(layer) 42 | 43 | switch boderType{ 44 | 45 | case .top: 46 | layer.frame = CGRectMake(0, 0, self.frame.width, size) 47 | 48 | case .left: 49 | layer.frame = CGRectMake(0, 0, size, self.frame.height) 50 | 51 | case .bottom: 52 | layer.frame = CGRectMake(0, self.frame.height - size, self.frame.width, size) 53 | 54 | case .right: 55 | layer.frame = CGRectMake(self.frame.width - size, 0, size, self.frame.height) 56 | 57 | 58 | // default: 59 | // return; 60 | 61 | } 62 | 63 | } 64 | 65 | 66 | 67 | } -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorder/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // BHBFreeBorder 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | 16 | /// 下上左边框 17 | let lbl:UILabel = UILabel() 18 | lbl.frame = CGRectMake(50, 50, 100, 50) 19 | self.view.addSubview(lbl) 20 | lbl.addBorder(UIColor.redColor(), size: 1, borderTypes: [BorderType.bottom.rawValue,BorderType.top.rawValue,BorderType.left.rawValue]) 21 | 22 | /// 下上右边框 23 | let lbl1:UILabel = UILabel() 24 | lbl1.frame = CGRectMake(50, 150, 100, 50) 25 | self.view.addSubview(lbl1) 26 | lbl1.addBorder(UIColor.redColor(), size: 1, borderTypes: [BorderType.bottom.rawValue,BorderType.top.rawValue,BorderType.right.rawValue]) 27 | 28 | /// 单根边框 29 | let lbl2:UILabel = UILabel() 30 | lbl2.frame = CGRectMake(50, 250, 100, 50) 31 | self.view.addSubview(lbl2) 32 | lbl2.addBorderLayer(UIColor.greenColor(), size: 1, boderType: BorderType.right); 33 | 34 | 35 | } 36 | 37 | override func didReceiveMemoryWarning() { 38 | super.didReceiveMemoryWarning() 39 | // Dispose of any resources that can be recreated. 40 | } 41 | 42 | 43 | } 44 | 45 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorderTests/BHBFreeBorderTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BHBFreeBorderTests.swift 3 | // BHBFreeBorderTests 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import BHBFreeBorder 11 | 12 | class BHBFreeBorderTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorderTests/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 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorderUITests/BHBFreeBorderUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BHBFreeBorderUITests.swift 3 | // BHBFreeBorderUITests 4 | // 5 | // Created by bihongbo on 15/12/30. 6 | // Copyright © 2015年 bihongbo. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class BHBFreeBorderUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // 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. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /BHBFreeBorder(swift)/BHBFreeBorderUITests/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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BHBFreeBorder 2 | UIView分类,OC、swift双语,自由添加四周边框,颜色粗细随心所欲(^_^) 3 | 4 | ###效果图 5 | ![效果图](http://7xkdhe.com1.z0.glb.clouddn.com/FreeBorder.png) 6 | 7 | 8 | ###使用方法 9 | 10 | ####1.导入`UIView+BHBFreeBorder`分类 11 | 12 | ####2.添加单根边框,例如只加右边框 13 | 14 | OC: 15 | 16 | /// 单根边框 17 | UILabel * lbl2 = [[UILabel alloc] init]; 18 | lbl2.frame = CGRectMake(50, 250, 100, 50); 19 | [self.view addSubview:lbl2]; 20 | [lbl2 addBorderLayerWithColor:[UIColor greenColor] size:1 borderType:BorderTypeRight]; 21 | 22 | swift: 23 | 24 | /// 单根边框 25 | let lbl2:UILabel = UILabel() 26 | lbl2.frame = CGRectMake(50, 250, 100, 50) 27 | self.view.addSubview(lbl2) 28 | lbl2.addBorderLayer(UIColor.greenColor(), size: 1, boderType: BorderType.right); 29 | 30 | ####3.添加n根边框,代码如下: 31 | 32 | OC: 33 | 34 | /// 下上左边框 35 | UILabel * lbl = [[UILabel alloc] init]; 36 | lbl.frame = CGRectMake(50, 50, 100, 50); 37 | [self.view addSubview:lbl]; 38 | [lbl addBorderWithColor:[UIColor redColor] size:1 borderTypes:@[@(BorderTypeBottom),@(BorderTypeTop),@(BorderTypeLeft)]]; 39 | /// 下上右边框 40 | UILabel * lbl1 = [[UILabel alloc] init]; 41 | lbl1.frame = CGRectMake(50, 150, 100, 50); 42 | [self.view addSubview:lbl1]; 43 | [lbl1 addBorderWithColor:[UIColor redColor] size:1 borderTypes:@[@(BorderTypeBottom),@(BorderTypeTop),@(BorderTypeRight)]]; 44 | 45 | swift: 46 | 47 | /// 下上左边框 48 | let lbl:UILabel = UILabel() 49 | lbl.frame = CGRectMake(50, 50, 100, 50) 50 | self.view.addSubview(lbl) 51 | lbl.addBorder(UIColor.redColor(), size: 1, borderTypes: [BorderType.bottom.rawValue,BorderType.top.rawValue,BorderType.left.rawValue]) 52 | /// 下上右边框 53 | let lbl1:UILabel = UILabel() 54 | lbl1.frame = CGRectMake(50, 150, 100, 50) 55 | self.view.addSubview(lbl1) 56 | lbl1.addBorder(UIColor.redColor(), size: 1, borderTypes: [BorderType.bottom.rawValue,BorderType.top.rawValue,BorderType.right.rawValue]) 57 | 58 | 59 | ####大家玩的开心,good luck! 60 | --------------------------------------------------------------------------------