├── .DS_Store ├── .gitignore ├── Example ├── .DS_Store └── Example │ ├── .DS_Store │ ├── Example.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── apple.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── apple.xcuserdatad │ │ └── xcschemes │ │ ├── Example.xcscheme │ │ └── xcschememanagement.plist │ ├── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── bridge.imageset │ │ │ ├── Contents.json │ │ │ └── photo-1454678904372-2ca94103eca4.jpg │ │ ├── cancel.imageset │ │ │ ├── Contents.json │ │ │ └── cancel.png │ │ ├── cross.imageset │ │ │ ├── Contents.json │ │ │ └── cross-2.png │ │ ├── rotate-option.imageset │ │ │ ├── Contents.json │ │ │ └── rotate-option.png │ │ └── smile.imageset │ │ │ ├── Contents.json │ │ │ └── smile.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift │ ├── ExampleTests │ ├── ExampleTests.swift │ └── Info.plist │ └── build │ └── Example.build │ └── Release-iphonesimulator │ └── Example.build │ ├── Example-all-non-framework-target-headers.hmap │ ├── Example-all-target-headers.hmap │ ├── Example-generated-files.hmap │ ├── Example-own-target-headers.hmap │ ├── Example-project-headers.hmap │ ├── Example.hmap │ ├── Objects-normal │ ├── i386 │ │ ├── Example-OutputFileMap.json │ │ └── Example.LinkFileList │ └── x86_64 │ │ ├── AppDelegate.d │ │ ├── AppDelegate.dia │ │ ├── AppDelegate.swiftdeps │ │ ├── Example-OutputFileMap.json │ │ ├── Example-master.swiftdeps │ │ ├── Example.LinkFileList │ │ ├── ViewController.d │ │ ├── ViewController.dia │ │ └── ViewController.swiftdeps │ ├── Script-2654991302B78101DB904FB1.sh │ ├── Script-A621D6B85F4D8F11DF6934AC.sh │ ├── Script-E302DD593268B86DC01F08D8.sh │ ├── dgph │ ├── dgph~ │ └── swift-overrides.hmap ├── Inspector.png ├── JLStickerTextView.podspec ├── LICENSE ├── README.md ├── Source ├── .DS_Store ├── CalcuteFunctions.swift ├── JLAttributedTextView.swift ├── JLStickerImageView.swift ├── JLStickerLabelView.swift └── adjustToFitFontOrWidth.swift └── demoScreenshot.jpg /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | .build/ 41 | 42 | # CocoaPods 43 | # 44 | # We recommend against adding the Pods directory to your .gitignore. However 45 | # you should judge for yourself, the pros and cons are mentioned at: 46 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 47 | # 48 | # Pods/ 49 | 50 | # Carthage 51 | # 52 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 53 | # Carthage/Checkouts 54 | 55 | Carthage/Build 56 | 57 | # fastlane 58 | # 59 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 60 | # screenshots whenever they are needed. 61 | # For more information about the recommended setup visit: 62 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 63 | 64 | fastlane/report.xml 65 | fastlane/Preview.html 66 | fastlane/screenshots 67 | fastlane/test_output 68 | -------------------------------------------------------------------------------- /Example/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/.DS_Store -------------------------------------------------------------------------------- /Example/Example/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/.DS_Store -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 18BE70951CCB10680019CC05 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18BE70941CCB10680019CC05 /* AppDelegate.swift */; }; 11 | 18BE70971CCB10680019CC05 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18BE70961CCB10680019CC05 /* ViewController.swift */; }; 12 | 18BE709A1CCB10680019CC05 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18BE70981CCB10680019CC05 /* Main.storyboard */; }; 13 | 18BE709C1CCB10680019CC05 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18BE709B1CCB10680019CC05 /* Assets.xcassets */; }; 14 | 18BE709F1CCB10680019CC05 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18BE709D1CCB10680019CC05 /* LaunchScreen.storyboard */; }; 15 | 18BE70AA1CCB10680019CC05 /* ExampleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18BE70A91CCB10680019CC05 /* ExampleTests.swift */; }; 16 | BD08D61D210D8D9A001A7EC9 /* JLStickerImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD08D618210D8D9A001A7EC9 /* JLStickerImageView.swift */; }; 17 | BD08D61E210D8D9A001A7EC9 /* JLStickerLabelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD08D619210D8D9A001A7EC9 /* JLStickerLabelView.swift */; }; 18 | BD08D61F210D8D9A001A7EC9 /* JLAttributedTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD08D61A210D8D9A001A7EC9 /* JLAttributedTextView.swift */; }; 19 | BD08D620210D8D9A001A7EC9 /* CalcuteFunctions.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD08D61B210D8D9A001A7EC9 /* CalcuteFunctions.swift */; }; 20 | BD08D621210D8D9A001A7EC9 /* adjustToFitFontOrWidth.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD08D61C210D8D9A001A7EC9 /* adjustToFitFontOrWidth.swift */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 18BE70A61CCB10680019CC05 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 18BE70891CCB10680019CC05 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 18BE70901CCB10680019CC05; 29 | remoteInfo = Example; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 18BE70911CCB10680019CC05 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 35 | 18BE70941CCB10680019CC05 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 36 | 18BE70961CCB10680019CC05 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 37 | 18BE70991CCB10680019CC05 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 38 | 18BE709B1CCB10680019CC05 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 39 | 18BE709E1CCB10680019CC05 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 40 | 18BE70A01CCB10680019CC05 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 41 | 18BE70A51CCB10680019CC05 /* ExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 18BE70A91CCB10680019CC05 /* ExampleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExampleTests.swift; sourceTree = ""; }; 43 | 18BE70AB1CCB10680019CC05 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 44 | BD08D618210D8D9A001A7EC9 /* JLStickerImageView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JLStickerImageView.swift; sourceTree = ""; }; 45 | BD08D619210D8D9A001A7EC9 /* JLStickerLabelView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JLStickerLabelView.swift; sourceTree = ""; }; 46 | BD08D61A210D8D9A001A7EC9 /* JLAttributedTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JLAttributedTextView.swift; sourceTree = ""; }; 47 | BD08D61B210D8D9A001A7EC9 /* CalcuteFunctions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalcuteFunctions.swift; sourceTree = ""; }; 48 | BD08D61C210D8D9A001A7EC9 /* adjustToFitFontOrWidth.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = adjustToFitFontOrWidth.swift; sourceTree = ""; }; 49 | /* End PBXFileReference section */ 50 | 51 | /* Begin PBXFrameworksBuildPhase section */ 52 | 18BE708E1CCB10680019CC05 /* Frameworks */ = { 53 | isa = PBXFrameworksBuildPhase; 54 | buildActionMask = 2147483647; 55 | files = ( 56 | ); 57 | runOnlyForDeploymentPostprocessing = 0; 58 | }; 59 | 18BE70A21CCB10680019CC05 /* Frameworks */ = { 60 | isa = PBXFrameworksBuildPhase; 61 | buildActionMask = 2147483647; 62 | files = ( 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 18BE70881CCB10680019CC05 = { 70 | isa = PBXGroup; 71 | children = ( 72 | BD08D617210D8D9A001A7EC9 /* Source */, 73 | 18BE70931CCB10680019CC05 /* Example */, 74 | 18BE70A81CCB10680019CC05 /* ExampleTests */, 75 | 18BE70921CCB10680019CC05 /* Products */, 76 | 50CD509E19FD05EDFF447E1D /* Frameworks */, 77 | ); 78 | sourceTree = ""; 79 | }; 80 | 18BE70921CCB10680019CC05 /* Products */ = { 81 | isa = PBXGroup; 82 | children = ( 83 | 18BE70911CCB10680019CC05 /* Example.app */, 84 | 18BE70A51CCB10680019CC05 /* ExampleTests.xctest */, 85 | ); 86 | name = Products; 87 | sourceTree = ""; 88 | }; 89 | 18BE70931CCB10680019CC05 /* Example */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 18BE70941CCB10680019CC05 /* AppDelegate.swift */, 93 | 18BE70961CCB10680019CC05 /* ViewController.swift */, 94 | 18BE70981CCB10680019CC05 /* Main.storyboard */, 95 | 18BE709B1CCB10680019CC05 /* Assets.xcassets */, 96 | 18BE709D1CCB10680019CC05 /* LaunchScreen.storyboard */, 97 | 18BE70A01CCB10680019CC05 /* Info.plist */, 98 | ); 99 | path = Example; 100 | sourceTree = ""; 101 | }; 102 | 18BE70A81CCB10680019CC05 /* ExampleTests */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 18BE70A91CCB10680019CC05 /* ExampleTests.swift */, 106 | 18BE70AB1CCB10680019CC05 /* Info.plist */, 107 | ); 108 | path = ExampleTests; 109 | sourceTree = ""; 110 | }; 111 | 50CD509E19FD05EDFF447E1D /* Frameworks */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | ); 115 | name = Frameworks; 116 | sourceTree = ""; 117 | }; 118 | BD08D617210D8D9A001A7EC9 /* Source */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | BD08D618210D8D9A001A7EC9 /* JLStickerImageView.swift */, 122 | BD08D619210D8D9A001A7EC9 /* JLStickerLabelView.swift */, 123 | BD08D61A210D8D9A001A7EC9 /* JLAttributedTextView.swift */, 124 | BD08D61B210D8D9A001A7EC9 /* CalcuteFunctions.swift */, 125 | BD08D61C210D8D9A001A7EC9 /* adjustToFitFontOrWidth.swift */, 126 | ); 127 | name = Source; 128 | path = ../../Source; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | 18BE70901CCB10680019CC05 /* Example */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = 18BE70AE1CCB10680019CC05 /* Build configuration list for PBXNativeTarget "Example" */; 137 | buildPhases = ( 138 | 18BE708D1CCB10680019CC05 /* Sources */, 139 | 18BE708E1CCB10680019CC05 /* Frameworks */, 140 | 18BE708F1CCB10680019CC05 /* Resources */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | ); 146 | name = Example; 147 | productName = Example; 148 | productReference = 18BE70911CCB10680019CC05 /* Example.app */; 149 | productType = "com.apple.product-type.application"; 150 | }; 151 | 18BE70A41CCB10680019CC05 /* ExampleTests */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 18BE70B11CCB10680019CC05 /* Build configuration list for PBXNativeTarget "ExampleTests" */; 154 | buildPhases = ( 155 | 18BE70A11CCB10680019CC05 /* Sources */, 156 | 18BE70A21CCB10680019CC05 /* Frameworks */, 157 | 18BE70A31CCB10680019CC05 /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | 18BE70A71CCB10680019CC05 /* PBXTargetDependency */, 163 | ); 164 | name = ExampleTests; 165 | productName = ExampleTests; 166 | productReference = 18BE70A51CCB10680019CC05 /* ExampleTests.xctest */; 167 | productType = "com.apple.product-type.bundle.unit-test"; 168 | }; 169 | /* End PBXNativeTarget section */ 170 | 171 | /* Begin PBXProject section */ 172 | 18BE70891CCB10680019CC05 /* Project object */ = { 173 | isa = PBXProject; 174 | attributes = { 175 | LastSwiftUpdateCheck = 0730; 176 | LastUpgradeCheck = 0940; 177 | ORGANIZATIONNAME = luiyezheng; 178 | TargetAttributes = { 179 | 18BE70901CCB10680019CC05 = { 180 | CreatedOnToolsVersion = 7.3; 181 | LastSwiftMigration = 0940; 182 | }; 183 | 18BE70A41CCB10680019CC05 = { 184 | CreatedOnToolsVersion = 7.3; 185 | LastSwiftMigration = 0940; 186 | TestTargetID = 18BE70901CCB10680019CC05; 187 | }; 188 | }; 189 | }; 190 | buildConfigurationList = 18BE708C1CCB10680019CC05 /* Build configuration list for PBXProject "Example" */; 191 | compatibilityVersion = "Xcode 3.2"; 192 | developmentRegion = English; 193 | hasScannedForEncodings = 0; 194 | knownRegions = ( 195 | en, 196 | Base, 197 | ); 198 | mainGroup = 18BE70881CCB10680019CC05; 199 | productRefGroup = 18BE70921CCB10680019CC05 /* Products */; 200 | projectDirPath = ""; 201 | projectRoot = ""; 202 | targets = ( 203 | 18BE70901CCB10680019CC05 /* Example */, 204 | 18BE70A41CCB10680019CC05 /* ExampleTests */, 205 | ); 206 | }; 207 | /* End PBXProject section */ 208 | 209 | /* Begin PBXResourcesBuildPhase section */ 210 | 18BE708F1CCB10680019CC05 /* Resources */ = { 211 | isa = PBXResourcesBuildPhase; 212 | buildActionMask = 2147483647; 213 | files = ( 214 | 18BE709F1CCB10680019CC05 /* LaunchScreen.storyboard in Resources */, 215 | 18BE709C1CCB10680019CC05 /* Assets.xcassets in Resources */, 216 | 18BE709A1CCB10680019CC05 /* Main.storyboard in Resources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | 18BE70A31CCB10680019CC05 /* Resources */ = { 221 | isa = PBXResourcesBuildPhase; 222 | buildActionMask = 2147483647; 223 | files = ( 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | }; 227 | /* End PBXResourcesBuildPhase section */ 228 | 229 | /* Begin PBXSourcesBuildPhase section */ 230 | 18BE708D1CCB10680019CC05 /* Sources */ = { 231 | isa = PBXSourcesBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | 18BE70971CCB10680019CC05 /* ViewController.swift in Sources */, 235 | BD08D61F210D8D9A001A7EC9 /* JLAttributedTextView.swift in Sources */, 236 | BD08D61E210D8D9A001A7EC9 /* JLStickerLabelView.swift in Sources */, 237 | BD08D61D210D8D9A001A7EC9 /* JLStickerImageView.swift in Sources */, 238 | BD08D621210D8D9A001A7EC9 /* adjustToFitFontOrWidth.swift in Sources */, 239 | 18BE70951CCB10680019CC05 /* AppDelegate.swift in Sources */, 240 | BD08D620210D8D9A001A7EC9 /* CalcuteFunctions.swift in Sources */, 241 | ); 242 | runOnlyForDeploymentPostprocessing = 0; 243 | }; 244 | 18BE70A11CCB10680019CC05 /* Sources */ = { 245 | isa = PBXSourcesBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | 18BE70AA1CCB10680019CC05 /* ExampleTests.swift in Sources */, 249 | ); 250 | runOnlyForDeploymentPostprocessing = 0; 251 | }; 252 | /* End PBXSourcesBuildPhase section */ 253 | 254 | /* Begin PBXTargetDependency section */ 255 | 18BE70A71CCB10680019CC05 /* PBXTargetDependency */ = { 256 | isa = PBXTargetDependency; 257 | target = 18BE70901CCB10680019CC05 /* Example */; 258 | targetProxy = 18BE70A61CCB10680019CC05 /* PBXContainerItemProxy */; 259 | }; 260 | /* End PBXTargetDependency section */ 261 | 262 | /* Begin PBXVariantGroup section */ 263 | 18BE70981CCB10680019CC05 /* Main.storyboard */ = { 264 | isa = PBXVariantGroup; 265 | children = ( 266 | 18BE70991CCB10680019CC05 /* Base */, 267 | ); 268 | name = Main.storyboard; 269 | sourceTree = ""; 270 | }; 271 | 18BE709D1CCB10680019CC05 /* LaunchScreen.storyboard */ = { 272 | isa = PBXVariantGroup; 273 | children = ( 274 | 18BE709E1CCB10680019CC05 /* Base */, 275 | ); 276 | name = LaunchScreen.storyboard; 277 | sourceTree = ""; 278 | }; 279 | /* End PBXVariantGroup section */ 280 | 281 | /* Begin XCBuildConfiguration section */ 282 | 18BE70AC1CCB10680019CC05 /* Debug */ = { 283 | isa = XCBuildConfiguration; 284 | buildSettings = { 285 | ALWAYS_SEARCH_USER_PATHS = NO; 286 | CLANG_ANALYZER_NONNULL = YES; 287 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 288 | CLANG_CXX_LIBRARY = "libc++"; 289 | CLANG_ENABLE_MODULES = YES; 290 | CLANG_ENABLE_OBJC_ARC = YES; 291 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 292 | CLANG_WARN_BOOL_CONVERSION = YES; 293 | CLANG_WARN_COMMA = YES; 294 | CLANG_WARN_CONSTANT_CONVERSION = YES; 295 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 296 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 297 | CLANG_WARN_EMPTY_BODY = YES; 298 | CLANG_WARN_ENUM_CONVERSION = YES; 299 | CLANG_WARN_INFINITE_RECURSION = YES; 300 | CLANG_WARN_INT_CONVERSION = YES; 301 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 302 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 303 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 304 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 305 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 306 | CLANG_WARN_STRICT_PROTOTYPES = YES; 307 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 308 | CLANG_WARN_UNREACHABLE_CODE = YES; 309 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 310 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 311 | COPY_PHASE_STRIP = NO; 312 | DEBUG_INFORMATION_FORMAT = dwarf; 313 | ENABLE_STRICT_OBJC_MSGSEND = YES; 314 | ENABLE_TESTABILITY = YES; 315 | GCC_C_LANGUAGE_STANDARD = gnu99; 316 | GCC_DYNAMIC_NO_PIC = NO; 317 | GCC_NO_COMMON_BLOCKS = YES; 318 | GCC_OPTIMIZATION_LEVEL = 0; 319 | GCC_PREPROCESSOR_DEFINITIONS = ( 320 | "DEBUG=1", 321 | "$(inherited)", 322 | ); 323 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 324 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 325 | GCC_WARN_UNDECLARED_SELECTOR = YES; 326 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 327 | GCC_WARN_UNUSED_FUNCTION = YES; 328 | GCC_WARN_UNUSED_VARIABLE = YES; 329 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 330 | MTL_ENABLE_DEBUG_INFO = YES; 331 | ONLY_ACTIVE_ARCH = YES; 332 | SDKROOT = iphoneos; 333 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 334 | TARGETED_DEVICE_FAMILY = "1,2"; 335 | }; 336 | name = Debug; 337 | }; 338 | 18BE70AD1CCB10680019CC05 /* Release */ = { 339 | isa = XCBuildConfiguration; 340 | buildSettings = { 341 | ALWAYS_SEARCH_USER_PATHS = NO; 342 | CLANG_ANALYZER_NONNULL = YES; 343 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 344 | CLANG_CXX_LIBRARY = "libc++"; 345 | CLANG_ENABLE_MODULES = YES; 346 | CLANG_ENABLE_OBJC_ARC = YES; 347 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 348 | CLANG_WARN_BOOL_CONVERSION = YES; 349 | CLANG_WARN_COMMA = YES; 350 | CLANG_WARN_CONSTANT_CONVERSION = YES; 351 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 352 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 353 | CLANG_WARN_EMPTY_BODY = YES; 354 | CLANG_WARN_ENUM_CONVERSION = YES; 355 | CLANG_WARN_INFINITE_RECURSION = YES; 356 | CLANG_WARN_INT_CONVERSION = YES; 357 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 358 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 359 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 360 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 361 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 362 | CLANG_WARN_STRICT_PROTOTYPES = YES; 363 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 364 | CLANG_WARN_UNREACHABLE_CODE = YES; 365 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 366 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 367 | COPY_PHASE_STRIP = NO; 368 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 369 | ENABLE_NS_ASSERTIONS = NO; 370 | ENABLE_STRICT_OBJC_MSGSEND = YES; 371 | GCC_C_LANGUAGE_STANDARD = gnu99; 372 | GCC_NO_COMMON_BLOCKS = YES; 373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 375 | GCC_WARN_UNDECLARED_SELECTOR = YES; 376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 377 | GCC_WARN_UNUSED_FUNCTION = YES; 378 | GCC_WARN_UNUSED_VARIABLE = YES; 379 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 380 | MTL_ENABLE_DEBUG_INFO = NO; 381 | SDKROOT = iphoneos; 382 | SWIFT_COMPILATION_MODE = wholemodule; 383 | TARGETED_DEVICE_FAMILY = "1,2"; 384 | VALIDATE_PRODUCT = YES; 385 | }; 386 | name = Release; 387 | }; 388 | 18BE70AF1CCB10680019CC05 /* Debug */ = { 389 | isa = XCBuildConfiguration; 390 | buildSettings = { 391 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 392 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 393 | INFOPLIST_FILE = Example/Info.plist; 394 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 395 | PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 398 | SWIFT_VERSION = 4.0; 399 | }; 400 | name = Debug; 401 | }; 402 | 18BE70B01CCB10680019CC05 /* Release */ = { 403 | isa = XCBuildConfiguration; 404 | buildSettings = { 405 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 406 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 407 | INFOPLIST_FILE = Example/Info.plist; 408 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 409 | PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.Example; 410 | PRODUCT_NAME = "$(TARGET_NAME)"; 411 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 412 | SWIFT_VERSION = 4.0; 413 | }; 414 | name = Release; 415 | }; 416 | 18BE70B21CCB10680019CC05 /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | buildSettings = { 419 | BUNDLE_LOADER = "$(TEST_HOST)"; 420 | INFOPLIST_FILE = ExampleTests/Info.plist; 421 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 422 | PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.ExampleTests; 423 | PRODUCT_NAME = "$(TARGET_NAME)"; 424 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 425 | SWIFT_VERSION = 4.0; 426 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 427 | }; 428 | name = Debug; 429 | }; 430 | 18BE70B31CCB10680019CC05 /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | BUNDLE_LOADER = "$(TEST_HOST)"; 434 | INFOPLIST_FILE = ExampleTests/Info.plist; 435 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 436 | PRODUCT_BUNDLE_IDENTIFIER = luiyezheng.ExampleTests; 437 | PRODUCT_NAME = "$(TARGET_NAME)"; 438 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 439 | SWIFT_VERSION = 4.0; 440 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Example.app/Example"; 441 | }; 442 | name = Release; 443 | }; 444 | /* End XCBuildConfiguration section */ 445 | 446 | /* Begin XCConfigurationList section */ 447 | 18BE708C1CCB10680019CC05 /* Build configuration list for PBXProject "Example" */ = { 448 | isa = XCConfigurationList; 449 | buildConfigurations = ( 450 | 18BE70AC1CCB10680019CC05 /* Debug */, 451 | 18BE70AD1CCB10680019CC05 /* Release */, 452 | ); 453 | defaultConfigurationIsVisible = 0; 454 | defaultConfigurationName = Release; 455 | }; 456 | 18BE70AE1CCB10680019CC05 /* Build configuration list for PBXNativeTarget "Example" */ = { 457 | isa = XCConfigurationList; 458 | buildConfigurations = ( 459 | 18BE70AF1CCB10680019CC05 /* Debug */, 460 | 18BE70B01CCB10680019CC05 /* Release */, 461 | ); 462 | defaultConfigurationIsVisible = 0; 463 | defaultConfigurationName = Release; 464 | }; 465 | 18BE70B11CCB10680019CC05 /* Build configuration list for PBXNativeTarget "ExampleTests" */ = { 466 | isa = XCConfigurationList; 467 | buildConfigurations = ( 468 | 18BE70B21CCB10680019CC05 /* Debug */, 469 | 18BE70B31CCB10680019CC05 /* Release */, 470 | ); 471 | defaultConfigurationIsVisible = 0; 472 | defaultConfigurationName = Release; 473 | }; 474 | /* End XCConfigurationList section */ 475 | }; 476 | rootObject = 18BE70891CCB10680019CC05 /* Project object */; 477 | } 478 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 66 | 72 | 73 | 74 | 75 | 76 | 77 | 83 | 85 | 91 | 92 | 93 | 94 | 96 | 97 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/Example/Example.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Example.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 18BE70901CCB10680019CC05 16 | 17 | primary 18 | 19 | 20 | 18BE70A41CCB10680019CC05 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Created by 刘业臻 on 16/4/23. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | private 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 | -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/bridge.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "photo-1454678904372-2ca94103eca4.jpg", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/bridge.imageset/photo-1454678904372-2ca94103eca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example/Assets.xcassets/bridge.imageset/photo-1454678904372-2ca94103eca4.jpg -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/cancel.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cancel.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/cancel.imageset/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example/Assets.xcassets/cancel.imageset/cancel.png -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/cross.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "cross-2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/cross.imageset/cross-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example/Assets.xcassets/cross.imageset/cross-2.png -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/rotate-option.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "rotate-option.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/rotate-option.imageset/rotate-option.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example/Assets.xcassets/rotate-option.imageset/rotate-option.png -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/smile.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "smile.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Example/Assets.xcassets/smile.imageset/smile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/Example/Assets.xcassets/smile.imageset/smile.png -------------------------------------------------------------------------------- /Example/Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | -------------------------------------------------------------------------------- /Example/Example/Example/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 | -------------------------------------------------------------------------------- /Example/Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Created by 刘业臻 on 16/4/23. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | var colorsArray = [UIColor.white, UIColor.black, UIColor.yellow] 13 | var fontNamesArray = ["AcademyEngravedLetPlain", "AlNile-Bold", "Chalkduster"] 14 | var textAlphaArray = [0.3, 0.6, 1.0] 15 | var lineSpacings = [1,30,50] 16 | var shadowOffsets = [1.0, 10.0, 20.0] 17 | 18 | @IBOutlet var stickerView: JLStickerImageView! 19 | 20 | @IBAction func onRefreshColor(_ sender: UIBarButtonItem) { 21 | let index = arc4random_uniform(3) 22 | let color = colorsArray[Int(index)] 23 | 24 | stickerView.textColor = color 25 | } 26 | 27 | @IBAction func onRefreshLineSpacing(_ sender: UIBarButtonItem) { 28 | let index = arc4random_uniform(3) 29 | let lineSpacing = lineSpacings[Int(index)] 30 | 31 | stickerView.lineSpacing = CGFloat(lineSpacing) 32 | } 33 | 34 | @IBAction func onRefreshFont(_ sender: UIBarButtonItem) { 35 | let index = arc4random_uniform(3) 36 | let fontName = fontNamesArray[Int(index)] 37 | 38 | stickerView.fontName = fontName 39 | } 40 | 41 | @IBAction func onRefreshTextAlpha(_ sender: UIBarButtonItem) { 42 | let index = arc4random_uniform(3) 43 | let textAlpha = textAlphaArray[Int(index)] 44 | 45 | stickerView.textAlpha = CGFloat(textAlpha) 46 | 47 | } 48 | 49 | @IBAction func onAddLabel(_ sender: UIBarButtonItem) { 50 | //Add the label 51 | stickerView.addLabel() 52 | 53 | //Modify the Label 54 | stickerView.textColor = UIColor.white 55 | stickerView.textAlpha = 1 56 | stickerView.currentlyEditingLabel.closeView!.image = UIImage(named: "cancel") 57 | stickerView.currentlyEditingLabel.rotateView?.image = UIImage(named: "rotate-option") 58 | stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.white.cgColor 59 | stickerView.currentlyEditingLabel.labelTextView?.font = UIFont.systemFont(ofSize: 14.0) 60 | stickerView.currentlyEditingLabel.labelTextView?.becomeFirstResponder() 61 | } 62 | 63 | @IBAction func onRefreshShadow(_ sender: UIBarButtonItem) { 64 | let index = arc4random_uniform(3) 65 | let shadowOffset = shadowOffsets[Int(index)] 66 | 67 | stickerView.textShadowOffset = CGSize(width: CGFloat(shadowOffset), height: 10) 68 | stickerView.textShadowColor = UIColor.red 69 | } 70 | 71 | @IBAction func onSaveImage(_ sender: UIBarButtonItem) { 72 | //render text on Image and save the Image 73 | let image = stickerView.renderContentOnView() 74 | UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil) 75 | 76 | } 77 | 78 | override func viewDidLoad() { 79 | super.viewDidLoad() 80 | 81 | } 82 | 83 | override func didReceiveMemoryWarning() { 84 | super.didReceiveMemoryWarning() 85 | // Dispose of any resources that can be recreated. 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /Example/Example/ExampleTests/ExampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleTests.swift 3 | // ExampleTests 4 | // 5 | // Created by 刘业臻 on 16/4/23. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Example 11 | 12 | class ExampleTests: 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.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/Example/ExampleTests/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 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-all-non-framework-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-all-non-framework-target-headers.hmap -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-all-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-all-target-headers.hmap -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-generated-files.hmap: -------------------------------------------------------------------------------- 1 | pamhx -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-own-target-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-own-target-headers.hmap -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-project-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example-project-headers.hmap -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Example.hmap -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/i386/Example-OutputFileMap.json: -------------------------------------------------------------------------------- 1 | {"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/Example\/AppDelegate.swift":{"swiftmodule":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate~partial.swiftmodule","object":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate.o","llvm-bc":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate.bc","diagnostics":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate.dia","dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate.d","swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/AppDelegate.swiftdeps"},"":{"swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/Example-master.swiftdeps"},"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/Example\/ViewController.swift":{"swiftmodule":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController~partial.swiftmodule","object":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController.o","llvm-bc":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController.bc","diagnostics":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController.dia","dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController.d","swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/i386\/ViewController.swiftdeps"}} -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/i386/Example.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/i386/ViewController.o 2 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/i386/AppDelegate.o 3 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.d: -------------------------------------------------------------------------------- 1 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.o : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 2 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate~partial.swiftmodule : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 3 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate~partial.swiftdoc : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 4 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.dia -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.swiftdeps: -------------------------------------------------------------------------------- 1 | ### Swift dependencies file v0 ### 2 | provides-top-level: 3 | - "AppDelegate" 4 | provides-nominal: 5 | - "C7Example11AppDelegate" 6 | provides-member: 7 | - ["C7Example11AppDelegate", ""] 8 | provides-dynamic-lookup: 9 | - "applicationDidBecomeActive" 10 | - "applicationWillTerminate" 11 | - "applicationWillEnterForeground" 12 | - "window" 13 | - "applicationDidEnterBackground" 14 | - "application" 15 | - "applicationWillResignActive" 16 | depends-top-level: 17 | - "AppDelegate" 18 | - "UIApplication" 19 | - "NSObject" 20 | - "UIResponder" 21 | - "UIWindow" 22 | - "UIApplicationDelegate" 23 | - "Bool" 24 | - !private "BooleanLiteralType" 25 | - "AnyObject" 26 | depends-member: 27 | - ["Ps9AnyObject", "application"] 28 | - ["Ps9AnyObject", "applicationDidBecomeActive"] 29 | - ["Ps9AnyObject", "applicationDidEnterBackground"] 30 | - ["Ps9AnyObject", "applicationDidFinishLaunching"] 31 | - ["Ps9AnyObject", "applicationDidReceiveMemoryWarning"] 32 | - ["Ps9AnyObject", "applicationProtectedDataDidBecomeAvailable"] 33 | - ["Ps9AnyObject", "applicationProtectedDataWillBecomeUnavailable"] 34 | - ["Ps9AnyObject", "applicationShouldRequestHealthAuthorization"] 35 | - ["Ps9AnyObject", "applicationSignificantTimeChange"] 36 | - ["Ps9AnyObject", "applicationWillEnterForeground"] 37 | - ["Ps9AnyObject", "applicationWillResignActive"] 38 | - ["Ps9AnyObject", "applicationWillTerminate"] 39 | - ["Ps9AnyObject", "init"] 40 | - ["Ps9AnyObject", "window"] 41 | - ["Ps9AnyObject", ""] 42 | - ["C7Example11AppDelegate", "AnyObject"] 43 | - ["C7Example11AppDelegate", "Bool"] 44 | - ["C7Example11AppDelegate", "NSObject"] 45 | - ["C7Example11AppDelegate", "UIApplication"] 46 | - ["C7Example11AppDelegate", "UIWindow"] 47 | - ["C7Example11AppDelegate", "application"] 48 | - ["C7Example11AppDelegate", "applicationDidBecomeActive"] 49 | - ["C7Example11AppDelegate", "applicationDidEnterBackground"] 50 | - ["C7Example11AppDelegate", "applicationDidFinishLaunching"] 51 | - ["C7Example11AppDelegate", "applicationDidReceiveMemoryWarning"] 52 | - ["C7Example11AppDelegate", "applicationProtectedDataDidBecomeAvailable"] 53 | - ["C7Example11AppDelegate", "applicationProtectedDataWillBecomeUnavailable"] 54 | - ["C7Example11AppDelegate", "applicationShouldRequestHealthAuthorization"] 55 | - ["C7Example11AppDelegate", "applicationSignificantTimeChange"] 56 | - ["C7Example11AppDelegate", "applicationWillEnterForeground"] 57 | - ["C7Example11AppDelegate", "applicationWillResignActive"] 58 | - ["C7Example11AppDelegate", "applicationWillTerminate"] 59 | - ["C7Example11AppDelegate", "deinit"] 60 | - ["C7Example11AppDelegate", "init"] 61 | - ["C7Example11AppDelegate", "window"] 62 | - ["Ps11CVarArgType", "application"] 63 | - ["Ps11CVarArgType", "applicationDidBecomeActive"] 64 | - ["Ps11CVarArgType", "applicationDidEnterBackground"] 65 | - ["Ps11CVarArgType", "applicationDidFinishLaunching"] 66 | - ["Ps11CVarArgType", "applicationDidReceiveMemoryWarning"] 67 | - ["Ps11CVarArgType", "applicationProtectedDataDidBecomeAvailable"] 68 | - ["Ps11CVarArgType", "applicationProtectedDataWillBecomeUnavailable"] 69 | - ["Ps11CVarArgType", "applicationShouldRequestHealthAuthorization"] 70 | - ["Ps11CVarArgType", "applicationSignificantTimeChange"] 71 | - ["Ps11CVarArgType", "applicationWillEnterForeground"] 72 | - ["Ps11CVarArgType", "applicationWillResignActive"] 73 | - ["Ps11CVarArgType", "applicationWillTerminate"] 74 | - ["Ps11CVarArgType", "init"] 75 | - ["Ps11CVarArgType", "window"] 76 | - ["Ps11CVarArgType", ""] 77 | - ["Ps28CustomDebugStringConvertible", "application"] 78 | - ["Ps28CustomDebugStringConvertible", "applicationDidBecomeActive"] 79 | - ["Ps28CustomDebugStringConvertible", "applicationDidEnterBackground"] 80 | - ["Ps28CustomDebugStringConvertible", "applicationDidFinishLaunching"] 81 | - ["Ps28CustomDebugStringConvertible", "applicationDidReceiveMemoryWarning"] 82 | - ["Ps28CustomDebugStringConvertible", "applicationProtectedDataDidBecomeAvailable"] 83 | - ["Ps28CustomDebugStringConvertible", "applicationProtectedDataWillBecomeUnavailable"] 84 | - ["Ps28CustomDebugStringConvertible", "applicationShouldRequestHealthAuthorization"] 85 | - ["Ps28CustomDebugStringConvertible", "applicationSignificantTimeChange"] 86 | - ["Ps28CustomDebugStringConvertible", "applicationWillEnterForeground"] 87 | - ["Ps28CustomDebugStringConvertible", "applicationWillResignActive"] 88 | - ["Ps28CustomDebugStringConvertible", "applicationWillTerminate"] 89 | - ["Ps28CustomDebugStringConvertible", "init"] 90 | - ["Ps28CustomDebugStringConvertible", "window"] 91 | - ["Ps28CustomDebugStringConvertible", ""] 92 | - ["Ps23CustomStringConvertible", "application"] 93 | - ["Ps23CustomStringConvertible", "applicationDidBecomeActive"] 94 | - ["Ps23CustomStringConvertible", "applicationDidEnterBackground"] 95 | - ["Ps23CustomStringConvertible", "applicationDidFinishLaunching"] 96 | - ["Ps23CustomStringConvertible", "applicationDidReceiveMemoryWarning"] 97 | - ["Ps23CustomStringConvertible", "applicationProtectedDataDidBecomeAvailable"] 98 | - ["Ps23CustomStringConvertible", "applicationProtectedDataWillBecomeUnavailable"] 99 | - ["Ps23CustomStringConvertible", "applicationShouldRequestHealthAuthorization"] 100 | - ["Ps23CustomStringConvertible", "applicationSignificantTimeChange"] 101 | - ["Ps23CustomStringConvertible", "applicationWillEnterForeground"] 102 | - ["Ps23CustomStringConvertible", "applicationWillResignActive"] 103 | - ["Ps23CustomStringConvertible", "applicationWillTerminate"] 104 | - ["Ps23CustomStringConvertible", "init"] 105 | - ["Ps23CustomStringConvertible", "window"] 106 | - ["Ps23CustomStringConvertible", ""] 107 | - ["Ps9Equatable", "application"] 108 | - ["Ps9Equatable", "applicationDidBecomeActive"] 109 | - ["Ps9Equatable", "applicationDidEnterBackground"] 110 | - ["Ps9Equatable", "applicationDidFinishLaunching"] 111 | - ["Ps9Equatable", "applicationDidReceiveMemoryWarning"] 112 | - ["Ps9Equatable", "applicationProtectedDataDidBecomeAvailable"] 113 | - ["Ps9Equatable", "applicationProtectedDataWillBecomeUnavailable"] 114 | - ["Ps9Equatable", "applicationShouldRequestHealthAuthorization"] 115 | - ["Ps9Equatable", "applicationSignificantTimeChange"] 116 | - ["Ps9Equatable", "applicationWillEnterForeground"] 117 | - ["Ps9Equatable", "applicationWillResignActive"] 118 | - ["Ps9Equatable", "applicationWillTerminate"] 119 | - ["Ps9Equatable", "init"] 120 | - ["Ps9Equatable", "window"] 121 | - ["Ps9Equatable", ""] 122 | - ["Ps8Hashable", "application"] 123 | - ["Ps8Hashable", "applicationDidBecomeActive"] 124 | - ["Ps8Hashable", "applicationDidEnterBackground"] 125 | - ["Ps8Hashable", "applicationDidFinishLaunching"] 126 | - ["Ps8Hashable", "applicationDidReceiveMemoryWarning"] 127 | - ["Ps8Hashable", "applicationProtectedDataDidBecomeAvailable"] 128 | - ["Ps8Hashable", "applicationProtectedDataWillBecomeUnavailable"] 129 | - ["Ps8Hashable", "applicationShouldRequestHealthAuthorization"] 130 | - ["Ps8Hashable", "applicationSignificantTimeChange"] 131 | - ["Ps8Hashable", "applicationWillEnterForeground"] 132 | - ["Ps8Hashable", "applicationWillResignActive"] 133 | - ["Ps8Hashable", "applicationWillTerminate"] 134 | - ["Ps8Hashable", "init"] 135 | - ["Ps8Hashable", "window"] 136 | - ["Ps8Hashable", ""] 137 | - ["CSo8NSObject", "AnyObject"] 138 | - ["CSo8NSObject", "Bool"] 139 | - ["CSo8NSObject", "NSObject"] 140 | - ["CSo8NSObject", "UIApplication"] 141 | - ["CSo8NSObject", "UIWindow"] 142 | - ["CSo8NSObject", "application"] 143 | - ["CSo8NSObject", "applicationDidBecomeActive"] 144 | - ["CSo8NSObject", "applicationDidEnterBackground"] 145 | - ["CSo8NSObject", "applicationDidFinishLaunching"] 146 | - ["CSo8NSObject", "applicationDidReceiveMemoryWarning"] 147 | - ["CSo8NSObject", "applicationProtectedDataDidBecomeAvailable"] 148 | - ["CSo8NSObject", "applicationProtectedDataWillBecomeUnavailable"] 149 | - ["CSo8NSObject", "applicationShouldRequestHealthAuthorization"] 150 | - ["CSo8NSObject", "applicationSignificantTimeChange"] 151 | - ["CSo8NSObject", "applicationWillEnterForeground"] 152 | - ["CSo8NSObject", "applicationWillResignActive"] 153 | - ["CSo8NSObject", "applicationWillTerminate"] 154 | - ["CSo8NSObject", "init"] 155 | - ["CSo8NSObject", "window"] 156 | - ["PSo16NSObjectProtocol", "application"] 157 | - ["PSo16NSObjectProtocol", "applicationDidBecomeActive"] 158 | - ["PSo16NSObjectProtocol", "applicationDidEnterBackground"] 159 | - ["PSo16NSObjectProtocol", "applicationDidFinishLaunching"] 160 | - ["PSo16NSObjectProtocol", "applicationDidReceiveMemoryWarning"] 161 | - ["PSo16NSObjectProtocol", "applicationProtectedDataDidBecomeAvailable"] 162 | - ["PSo16NSObjectProtocol", "applicationProtectedDataWillBecomeUnavailable"] 163 | - ["PSo16NSObjectProtocol", "applicationShouldRequestHealthAuthorization"] 164 | - ["PSo16NSObjectProtocol", "applicationSignificantTimeChange"] 165 | - ["PSo16NSObjectProtocol", "applicationWillEnterForeground"] 166 | - ["PSo16NSObjectProtocol", "applicationWillResignActive"] 167 | - ["PSo16NSObjectProtocol", "applicationWillTerminate"] 168 | - ["PSo16NSObjectProtocol", "init"] 169 | - ["PSo16NSObjectProtocol", "window"] 170 | - ["PSo16NSObjectProtocol", ""] 171 | - ["PSo21UIApplicationDelegate", "application"] 172 | - ["PSo21UIApplicationDelegate", "applicationDidBecomeActive"] 173 | - ["PSo21UIApplicationDelegate", "applicationDidEnterBackground"] 174 | - ["PSo21UIApplicationDelegate", "applicationDidFinishLaunching"] 175 | - ["PSo21UIApplicationDelegate", "applicationDidReceiveMemoryWarning"] 176 | - ["PSo21UIApplicationDelegate", "applicationProtectedDataDidBecomeAvailable"] 177 | - ["PSo21UIApplicationDelegate", "applicationProtectedDataWillBecomeUnavailable"] 178 | - ["PSo21UIApplicationDelegate", "applicationShouldRequestHealthAuthorization"] 179 | - ["PSo21UIApplicationDelegate", "applicationSignificantTimeChange"] 180 | - ["PSo21UIApplicationDelegate", "applicationWillEnterForeground"] 181 | - ["PSo21UIApplicationDelegate", "applicationWillResignActive"] 182 | - ["PSo21UIApplicationDelegate", "applicationWillTerminate"] 183 | - ["PSo21UIApplicationDelegate", "window"] 184 | - ["PSo21UIApplicationDelegate", ""] 185 | - ["CSo11UIResponder", "AnyObject"] 186 | - ["CSo11UIResponder", "Bool"] 187 | - ["CSo11UIResponder", "NSObject"] 188 | - ["CSo11UIResponder", "UIApplication"] 189 | - ["CSo11UIResponder", "UIWindow"] 190 | - ["CSo11UIResponder", "application"] 191 | - ["CSo11UIResponder", "applicationDidBecomeActive"] 192 | - ["CSo11UIResponder", "applicationDidEnterBackground"] 193 | - ["CSo11UIResponder", "applicationDidFinishLaunching"] 194 | - ["CSo11UIResponder", "applicationDidReceiveMemoryWarning"] 195 | - ["CSo11UIResponder", "applicationProtectedDataDidBecomeAvailable"] 196 | - ["CSo11UIResponder", "applicationProtectedDataWillBecomeUnavailable"] 197 | - ["CSo11UIResponder", "applicationShouldRequestHealthAuthorization"] 198 | - ["CSo11UIResponder", "applicationSignificantTimeChange"] 199 | - ["CSo11UIResponder", "applicationWillEnterForeground"] 200 | - ["CSo11UIResponder", "applicationWillResignActive"] 201 | - ["CSo11UIResponder", "applicationWillTerminate"] 202 | - ["CSo11UIResponder", "init"] 203 | - ["CSo11UIResponder", "window"] 204 | - ["CSo11UIResponder", ""] 205 | depends-nominal: 206 | - "Ps9AnyObject" 207 | - "C7Example11AppDelegate" 208 | - "Ps11CVarArgType" 209 | - "Ps28CustomDebugStringConvertible" 210 | - "Ps23CustomStringConvertible" 211 | - "Ps9Equatable" 212 | - "Ps8Hashable" 213 | - "CSo8NSObject" 214 | - "PSo16NSObjectProtocol" 215 | - "PSo21UIApplicationDelegate" 216 | - "CSo11UIResponder" 217 | depends-dynamic-lookup: 218 | depends-external: 219 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule" 220 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule" 221 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule" 222 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule" 223 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule" 224 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule" 225 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule" 226 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule" 227 | interface-hash: "eb6deb7e97b205db2b1f8c4c6c87743c" 228 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/Example-OutputFileMap.json: -------------------------------------------------------------------------------- 1 | {"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/Example\/AppDelegate.swift":{"swiftmodule":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate~partial.swiftmodule","object":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate.o","llvm-bc":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate.bc","diagnostics":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate.dia","dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate.d","swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/AppDelegate.swiftdeps"},"":{"swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/Example-master.swiftdeps"},"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/Example\/ViewController.swift":{"swiftmodule":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController~partial.swiftmodule","object":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController.o","llvm-bc":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController.bc","diagnostics":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController.dia","dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController.d","swift-dependencies":"\/Users\/apple\/Documents\/computerscience&math&finance,project,learningNotes\/computerscience\/project\/JLStickerTextView\/Example\/Example\/build\/Example.build\/Release-iphonesimulator\/Example.build\/Objects-normal\/x86_64\/ViewController.swiftdeps"}} -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/Example-master.swiftdeps: -------------------------------------------------------------------------------- 1 | version: "Apple Swift version 2.2 (swiftlang-703.0.18.1 clang-703.0.29)" 2 | options: "5026ca4e1739dde1c4b1f5d843f67542" 3 | build_time: [514777633, 98207000] 4 | inputs: 5 | "/Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift": !dirty [514718524, 0] 6 | "/Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift": !dirty [514692456, 0] 7 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/Example.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.o 2 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/AppDelegate.o 3 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.d: -------------------------------------------------------------------------------- 1 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.o : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 2 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController~partial.swiftmodule : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 3 | /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController~partial.swiftdoc : /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/ViewController.swift /Users/apple/Documents/computerscience&math&finance,project,learningNotes/computerscience/project/JLStickerTextView/Example/Example/Example/AppDelegate.swift /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule 4 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.dia: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.dia -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Objects-normal/x86_64/ViewController.swiftdeps: -------------------------------------------------------------------------------- 1 | ### Swift dependencies file v0 ### 2 | provides-top-level: 3 | - "ViewController" 4 | provides-nominal: 5 | - "C7Example14ViewController" 6 | provides-member: 7 | - ["C7Example14ViewController", ""] 8 | provides-dynamic-lookup: 9 | - "onAddLabel" 10 | - "onRefreshFont" 11 | - "onRefreshColor" 12 | - "textAlphaArray" 13 | - "didReceiveMemoryWarning" 14 | - "onRefreshTextAlpha" 15 | - "viewDidLoad" 16 | - "fontNamesArray" 17 | - "onSaveImage" 18 | - "colorsArray" 19 | depends-top-level: 20 | - "ViewController" 21 | - "UIBarButtonItem" 22 | - "UIViewController" 23 | - !private "Int" 24 | - !private "CGFloat" 25 | - "StringLiteralType" 26 | - !private "UIImageWriteToSavedPhotosAlbum" 27 | - "JLStickerImageView" 28 | - "Array" 29 | - !private "arc4random_uniform" 30 | - "UIColor" 31 | depends-member: 32 | - !private ["Ps16AbsoluteValuable", "init"] 33 | - !private ["Ps9AnyObject", "CGFloat"] 34 | - !private ["Ps9AnyObject", "Int"] 35 | - ["Ps9AnyObject", "UIColor"] 36 | - !private ["Ps9AnyObject", "UIImageWriteToSavedPhotosAlbum"] 37 | - !private ["Ps9AnyObject", "arc4random_uniform"] 38 | - ["Ps9AnyObject", "blackColor"] 39 | - !private ["Ps9AnyObject", "center"] 40 | - ["Ps9AnyObject", "colorsArray"] 41 | - ["Ps9AnyObject", "didReceiveMemoryWarning"] 42 | - ["Ps9AnyObject", "fontNamesArray"] 43 | - ["Ps9AnyObject", "init"] 44 | - ["Ps9AnyObject", "onAddLabel"] 45 | - ["Ps9AnyObject", "onRefreshColor"] 46 | - ["Ps9AnyObject", "onRefreshFont"] 47 | - ["Ps9AnyObject", "onRefreshTextAlpha"] 48 | - ["Ps9AnyObject", "onSaveImage"] 49 | - !private ["Ps9AnyObject", "stickerView"] 50 | - ["Ps9AnyObject", "textAlphaArray"] 51 | - !private ["Ps9AnyObject", "view"] 52 | - ["Ps9AnyObject", "viewDidLoad"] 53 | - ["Ps9AnyObject", "whiteColor"] 54 | - ["Ps9AnyObject", "yellowColor"] 55 | - ["Ps9AnyObject", ""] 56 | - ["Sa", "Element"] 57 | - !private ["Sa", "Generator"] 58 | - !private ["Sa", "Index"] 59 | - !private ["Sa", "SubSequence"] 60 | - !private ["Sa", "deinit"] 61 | - !private ["Sa", "subscript"] 62 | - ["Ps23ArrayLiteralConvertible", "Element"] 63 | - !private ["Ps23ArrayLiteralConvertible", "Generator"] 64 | - !private ["Ps23ArrayLiteralConvertible", "Index"] 65 | - !private ["Ps23ArrayLiteralConvertible", "SubSequence"] 66 | - !private ["Ps23ArrayLiteralConvertible", "subscript"] 67 | - !private ["Vs10ArraySlice", "Generator"] 68 | - !private ["Vs10ArraySlice", "Index"] 69 | - !private ["Vs10ArraySlice", "SubSequence"] 70 | - !private ["Ps22BidirectionalIndexType", "Distance"] 71 | - !private ["Ps22BidirectionalIndexType", "IntegerLiteralType"] 72 | - !private ["Ps22BidirectionalIndexType", "init"] 73 | - !private ["Ps21BitwiseOperationsType", "Distance"] 74 | - !private ["Ps21BitwiseOperationsType", "IntegerLiteralType"] 75 | - !private ["Ps21BitwiseOperationsType", "init"] 76 | - !private ["V12CoreGraphics7CGFloat", "init"] 77 | - !private ["Ps11CVarArgType", "CGFloat"] 78 | - !private ["Ps11CVarArgType", "Distance"] 79 | - !private ["Ps11CVarArgType", "Int"] 80 | - !private ["Ps11CVarArgType", "IntegerLiteralType"] 81 | - ["Ps11CVarArgType", "UIColor"] 82 | - !private ["Ps11CVarArgType", "UIImageWriteToSavedPhotosAlbum"] 83 | - !private ["Ps11CVarArgType", "arc4random_uniform"] 84 | - ["Ps11CVarArgType", "blackColor"] 85 | - !private ["Ps11CVarArgType", "center"] 86 | - ["Ps11CVarArgType", "colorsArray"] 87 | - ["Ps11CVarArgType", "didReceiveMemoryWarning"] 88 | - ["Ps11CVarArgType", "fontNamesArray"] 89 | - ["Ps11CVarArgType", "init"] 90 | - ["Ps11CVarArgType", "onAddLabel"] 91 | - ["Ps11CVarArgType", "onRefreshColor"] 92 | - ["Ps11CVarArgType", "onRefreshFont"] 93 | - ["Ps11CVarArgType", "onRefreshTextAlpha"] 94 | - ["Ps11CVarArgType", "onSaveImage"] 95 | - !private ["Ps11CVarArgType", "stickerView"] 96 | - ["Ps11CVarArgType", "textAlphaArray"] 97 | - !private ["Ps11CVarArgType", "view"] 98 | - ["Ps11CVarArgType", "viewDidLoad"] 99 | - ["Ps11CVarArgType", "whiteColor"] 100 | - ["Ps11CVarArgType", "yellowColor"] 101 | - ["Ps11CVarArgType", ""] 102 | - ["Ps14CollectionType", "Element"] 103 | - !private ["Ps14CollectionType", "Generator"] 104 | - !private ["Ps14CollectionType", "Index"] 105 | - !private ["Ps14CollectionType", "SubSequence"] 106 | - !private ["Ps14CollectionType", "_Element"] 107 | - !private ["Ps14CollectionType", "subscript"] 108 | - !private ["Ps10Comparable", "Distance"] 109 | - !private ["Ps10Comparable", "IntegerLiteralType"] 110 | - !private ["Ps10Comparable", "init"] 111 | - !private ["Ps28CustomDebugStringConvertible", "CGFloat"] 112 | - ["Ps28CustomDebugStringConvertible", "Element"] 113 | - !private ["Ps28CustomDebugStringConvertible", "Generator"] 114 | - !private ["Ps28CustomDebugStringConvertible", "Index"] 115 | - !private ["Ps28CustomDebugStringConvertible", "Int"] 116 | - !private ["Ps28CustomDebugStringConvertible", "SubSequence"] 117 | - ["Ps28CustomDebugStringConvertible", "UIColor"] 118 | - !private ["Ps28CustomDebugStringConvertible", "UIImageWriteToSavedPhotosAlbum"] 119 | - !private ["Ps28CustomDebugStringConvertible", "arc4random_uniform"] 120 | - ["Ps28CustomDebugStringConvertible", "blackColor"] 121 | - !private ["Ps28CustomDebugStringConvertible", "center"] 122 | - ["Ps28CustomDebugStringConvertible", "colorsArray"] 123 | - ["Ps28CustomDebugStringConvertible", "didReceiveMemoryWarning"] 124 | - ["Ps28CustomDebugStringConvertible", "fontNamesArray"] 125 | - ["Ps28CustomDebugStringConvertible", "init"] 126 | - ["Ps28CustomDebugStringConvertible", "onAddLabel"] 127 | - ["Ps28CustomDebugStringConvertible", "onRefreshColor"] 128 | - ["Ps28CustomDebugStringConvertible", "onRefreshFont"] 129 | - ["Ps28CustomDebugStringConvertible", "onRefreshTextAlpha"] 130 | - ["Ps28CustomDebugStringConvertible", "onSaveImage"] 131 | - !private ["Ps28CustomDebugStringConvertible", "stickerView"] 132 | - !private ["Ps28CustomDebugStringConvertible", "subscript"] 133 | - ["Ps28CustomDebugStringConvertible", "textAlphaArray"] 134 | - !private ["Ps28CustomDebugStringConvertible", "view"] 135 | - ["Ps28CustomDebugStringConvertible", "viewDidLoad"] 136 | - ["Ps28CustomDebugStringConvertible", "whiteColor"] 137 | - ["Ps28CustomDebugStringConvertible", "yellowColor"] 138 | - ["Ps28CustomDebugStringConvertible", ""] 139 | - !private ["Ps23CustomStringConvertible", "CGFloat"] 140 | - !private ["Ps23CustomStringConvertible", "Distance"] 141 | - ["Ps23CustomStringConvertible", "Element"] 142 | - !private ["Ps23CustomStringConvertible", "Generator"] 143 | - !private ["Ps23CustomStringConvertible", "Index"] 144 | - !private ["Ps23CustomStringConvertible", "Int"] 145 | - !private ["Ps23CustomStringConvertible", "IntegerLiteralType"] 146 | - !private ["Ps23CustomStringConvertible", "SubSequence"] 147 | - ["Ps23CustomStringConvertible", "UIColor"] 148 | - !private ["Ps23CustomStringConvertible", "UIImageWriteToSavedPhotosAlbum"] 149 | - !private ["Ps23CustomStringConvertible", "arc4random_uniform"] 150 | - ["Ps23CustomStringConvertible", "blackColor"] 151 | - !private ["Ps23CustomStringConvertible", "center"] 152 | - ["Ps23CustomStringConvertible", "colorsArray"] 153 | - ["Ps23CustomStringConvertible", "didReceiveMemoryWarning"] 154 | - ["Ps23CustomStringConvertible", "fontNamesArray"] 155 | - ["Ps23CustomStringConvertible", "init"] 156 | - ["Ps23CustomStringConvertible", "onAddLabel"] 157 | - ["Ps23CustomStringConvertible", "onRefreshColor"] 158 | - ["Ps23CustomStringConvertible", "onRefreshFont"] 159 | - ["Ps23CustomStringConvertible", "onRefreshTextAlpha"] 160 | - ["Ps23CustomStringConvertible", "onSaveImage"] 161 | - !private ["Ps23CustomStringConvertible", "stickerView"] 162 | - !private ["Ps23CustomStringConvertible", "subscript"] 163 | - ["Ps23CustomStringConvertible", "textAlphaArray"] 164 | - !private ["Ps23CustomStringConvertible", "view"] 165 | - ["Ps23CustomStringConvertible", "viewDidLoad"] 166 | - ["Ps23CustomStringConvertible", "whiteColor"] 167 | - ["Ps23CustomStringConvertible", "yellowColor"] 168 | - ["Ps23CustomStringConvertible", ""] 169 | - !private ["Ps9Equatable", "CGFloat"] 170 | - !private ["Ps9Equatable", "Distance"] 171 | - !private ["Ps9Equatable", "Int"] 172 | - !private ["Ps9Equatable", "IntegerLiteralType"] 173 | - ["Ps9Equatable", "UIColor"] 174 | - !private ["Ps9Equatable", "UIImageWriteToSavedPhotosAlbum"] 175 | - !private ["Ps9Equatable", "arc4random_uniform"] 176 | - ["Ps9Equatable", "blackColor"] 177 | - !private ["Ps9Equatable", "center"] 178 | - ["Ps9Equatable", "colorsArray"] 179 | - ["Ps9Equatable", "didReceiveMemoryWarning"] 180 | - ["Ps9Equatable", "fontNamesArray"] 181 | - ["Ps9Equatable", "init"] 182 | - ["Ps9Equatable", "onAddLabel"] 183 | - ["Ps9Equatable", "onRefreshColor"] 184 | - ["Ps9Equatable", "onRefreshFont"] 185 | - ["Ps9Equatable", "onRefreshTextAlpha"] 186 | - ["Ps9Equatable", "onSaveImage"] 187 | - !private ["Ps9Equatable", "stickerView"] 188 | - ["Ps9Equatable", "textAlphaArray"] 189 | - !private ["Ps9Equatable", "view"] 190 | - ["Ps9Equatable", "viewDidLoad"] 191 | - ["Ps9Equatable", "whiteColor"] 192 | - ["Ps9Equatable", "yellowColor"] 193 | - ["Ps9Equatable", ""] 194 | - !private ["Ps23FloatLiteralConvertible", "init"] 195 | - !private ["Ps17FloatingPointType", "init"] 196 | - !private ["Ps16ForwardIndexType", "Distance"] 197 | - !private ["Ps16ForwardIndexType", "IntegerLiteralType"] 198 | - !private ["Ps16ForwardIndexType", "init"] 199 | - !private ["Ps13GeneratorType", "Element"] 200 | - !private ["Ps8Hashable", "CGFloat"] 201 | - !private ["Ps8Hashable", "Distance"] 202 | - !private ["Ps8Hashable", "Int"] 203 | - !private ["Ps8Hashable", "IntegerLiteralType"] 204 | - ["Ps8Hashable", "UIColor"] 205 | - !private ["Ps8Hashable", "UIImageWriteToSavedPhotosAlbum"] 206 | - !private ["Ps8Hashable", "arc4random_uniform"] 207 | - ["Ps8Hashable", "blackColor"] 208 | - !private ["Ps8Hashable", "center"] 209 | - ["Ps8Hashable", "colorsArray"] 210 | - ["Ps8Hashable", "didReceiveMemoryWarning"] 211 | - ["Ps8Hashable", "fontNamesArray"] 212 | - ["Ps8Hashable", "init"] 213 | - ["Ps8Hashable", "onAddLabel"] 214 | - ["Ps8Hashable", "onRefreshColor"] 215 | - ["Ps8Hashable", "onRefreshFont"] 216 | - ["Ps8Hashable", "onRefreshTextAlpha"] 217 | - ["Ps8Hashable", "onSaveImage"] 218 | - !private ["Ps8Hashable", "stickerView"] 219 | - ["Ps8Hashable", "textAlphaArray"] 220 | - !private ["Ps8Hashable", "view"] 221 | - ["Ps8Hashable", "viewDidLoad"] 222 | - ["Ps8Hashable", "whiteColor"] 223 | - ["Ps8Hashable", "yellowColor"] 224 | - ["Ps8Hashable", ""] 225 | - ["Ps9Indexable", "Element"] 226 | - !private ["Ps9Indexable", "Generator"] 227 | - !private ["Ps9Indexable", "Index"] 228 | - !private ["Ps9Indexable", "SubSequence"] 229 | - !private ["Ps9Indexable", "_Element"] 230 | - !private ["Ps9Indexable", "subscript"] 231 | - !private ["Vs17IndexingGenerator", "Element"] 232 | - !private ["Si", "Distance"] 233 | - !private ["Si", "IntegerLiteralType"] 234 | - !private ["Si", "init"] 235 | - !private ["Ps21IntegerArithmeticType", "Distance"] 236 | - !private ["Ps21IntegerArithmeticType", "IntegerLiteralType"] 237 | - !private ["Ps21IntegerArithmeticType", "init"] 238 | - !private ["Ps25IntegerLiteralConvertible", "Distance"] 239 | - !private ["Ps25IntegerLiteralConvertible", "IntegerLiteralType"] 240 | - !private ["Ps25IntegerLiteralConvertible", "init"] 241 | - !private ["Ps11IntegerType", "Distance"] 242 | - !private ["Ps11IntegerType", "IntegerLiteralType"] 243 | - !private ["Ps11IntegerType", "init"] 244 | - !private ["Ps14MirrorPathType", "Distance"] 245 | - !private ["Ps14MirrorPathType", "IntegerLiteralType"] 246 | - !private ["Ps14MirrorPathType", "init"] 247 | - ["Ps21MutableCollectionType", "Element"] 248 | - !private ["Ps21MutableCollectionType", "Generator"] 249 | - !private ["Ps21MutableCollectionType", "Index"] 250 | - !private ["Ps21MutableCollectionType", "SubSequence"] 251 | - !private ["Ps21MutableCollectionType", "subscript"] 252 | - ["Ps16MutableIndexable", "Element"] 253 | - !private ["Ps16MutableIndexable", "Generator"] 254 | - !private ["Ps16MutableIndexable", "Index"] 255 | - !private ["Ps16MutableIndexable", "SubSequence"] 256 | - !private ["Ps16MutableIndexable", "subscript"] 257 | - ["Ps16MutableSliceable", "Element"] 258 | - !private ["Ps16MutableSliceable", "Generator"] 259 | - !private ["Ps16MutableSliceable", "Index"] 260 | - !private ["Ps16MutableSliceable", "SubSequence"] 261 | - !private ["Ps16MutableSliceable", "subscript"] 262 | - !private ["PSo8NSCoding", "CGFloat"] 263 | - !private ["PSo8NSCoding", "Int"] 264 | - ["PSo8NSCoding", "UIColor"] 265 | - !private ["PSo8NSCoding", "UIImageWriteToSavedPhotosAlbum"] 266 | - !private ["PSo8NSCoding", "arc4random_uniform"] 267 | - ["PSo8NSCoding", "blackColor"] 268 | - !private ["PSo8NSCoding", "center"] 269 | - ["PSo8NSCoding", "colorsArray"] 270 | - ["PSo8NSCoding", "didReceiveMemoryWarning"] 271 | - ["PSo8NSCoding", "fontNamesArray"] 272 | - ["PSo8NSCoding", "init"] 273 | - ["PSo8NSCoding", "onAddLabel"] 274 | - ["PSo8NSCoding", "onRefreshColor"] 275 | - ["PSo8NSCoding", "onRefreshFont"] 276 | - ["PSo8NSCoding", "onRefreshTextAlpha"] 277 | - ["PSo8NSCoding", "onSaveImage"] 278 | - !private ["PSo8NSCoding", "stickerView"] 279 | - ["PSo8NSCoding", "textAlphaArray"] 280 | - !private ["PSo8NSCoding", "view"] 281 | - ["PSo8NSCoding", "viewDidLoad"] 282 | - ["PSo8NSCoding", "whiteColor"] 283 | - ["PSo8NSCoding", "yellowColor"] 284 | - ["PSo8NSCoding", ""] 285 | - ["PSo9NSCopying", "blackColor"] 286 | - ["PSo9NSCopying", "whiteColor"] 287 | - ["PSo9NSCopying", "yellowColor"] 288 | - !private ["PSo26NSExtensionRequestHandling", "CGFloat"] 289 | - !private ["PSo26NSExtensionRequestHandling", "Int"] 290 | - ["PSo26NSExtensionRequestHandling", "UIColor"] 291 | - !private ["PSo26NSExtensionRequestHandling", "UIImageWriteToSavedPhotosAlbum"] 292 | - !private ["PSo26NSExtensionRequestHandling", "arc4random_uniform"] 293 | - ["PSo26NSExtensionRequestHandling", "colorsArray"] 294 | - ["PSo26NSExtensionRequestHandling", "didReceiveMemoryWarning"] 295 | - ["PSo26NSExtensionRequestHandling", "fontNamesArray"] 296 | - ["PSo26NSExtensionRequestHandling", "init"] 297 | - ["PSo26NSExtensionRequestHandling", "onAddLabel"] 298 | - ["PSo26NSExtensionRequestHandling", "onRefreshColor"] 299 | - ["PSo26NSExtensionRequestHandling", "onRefreshFont"] 300 | - ["PSo26NSExtensionRequestHandling", "onRefreshTextAlpha"] 301 | - ["PSo26NSExtensionRequestHandling", "onSaveImage"] 302 | - !private ["PSo26NSExtensionRequestHandling", "stickerView"] 303 | - ["PSo26NSExtensionRequestHandling", "textAlphaArray"] 304 | - !private ["PSo26NSExtensionRequestHandling", "view"] 305 | - ["PSo26NSExtensionRequestHandling", "viewDidLoad"] 306 | - ["PSo26NSExtensionRequestHandling", ""] 307 | - !private ["CSo8NSObject", "CGFloat"] 308 | - !private ["CSo8NSObject", "Int"] 309 | - ["CSo8NSObject", "JLStickerImageView"] 310 | - ["CSo8NSObject", "UIBarButtonItem"] 311 | - ["CSo8NSObject", "UIColor"] 312 | - !private ["CSo8NSObject", "UIImageWriteToSavedPhotosAlbum"] 313 | - !private ["CSo8NSObject", "arc4random_uniform"] 314 | - ["CSo8NSObject", "blackColor"] 315 | - !private ["CSo8NSObject", "center"] 316 | - ["CSo8NSObject", "colorsArray"] 317 | - ["CSo8NSObject", "didReceiveMemoryWarning"] 318 | - ["CSo8NSObject", "fontNamesArray"] 319 | - ["CSo8NSObject", "init"] 320 | - ["CSo8NSObject", "onAddLabel"] 321 | - ["CSo8NSObject", "onRefreshColor"] 322 | - ["CSo8NSObject", "onRefreshFont"] 323 | - ["CSo8NSObject", "onRefreshTextAlpha"] 324 | - ["CSo8NSObject", "onSaveImage"] 325 | - !private ["CSo8NSObject", "stickerView"] 326 | - ["CSo8NSObject", "textAlphaArray"] 327 | - !private ["CSo8NSObject", "view"] 328 | - ["CSo8NSObject", "viewDidLoad"] 329 | - ["CSo8NSObject", "whiteColor"] 330 | - ["CSo8NSObject", "yellowColor"] 331 | - !private ["PSo16NSObjectProtocol", "CGFloat"] 332 | - !private ["PSo16NSObjectProtocol", "Int"] 333 | - ["PSo16NSObjectProtocol", "UIColor"] 334 | - !private ["PSo16NSObjectProtocol", "UIImageWriteToSavedPhotosAlbum"] 335 | - !private ["PSo16NSObjectProtocol", "arc4random_uniform"] 336 | - ["PSo16NSObjectProtocol", "blackColor"] 337 | - !private ["PSo16NSObjectProtocol", "center"] 338 | - ["PSo16NSObjectProtocol", "colorsArray"] 339 | - ["PSo16NSObjectProtocol", "didReceiveMemoryWarning"] 340 | - ["PSo16NSObjectProtocol", "fontNamesArray"] 341 | - ["PSo16NSObjectProtocol", "init"] 342 | - ["PSo16NSObjectProtocol", "onAddLabel"] 343 | - ["PSo16NSObjectProtocol", "onRefreshColor"] 344 | - ["PSo16NSObjectProtocol", "onRefreshFont"] 345 | - ["PSo16NSObjectProtocol", "onRefreshTextAlpha"] 346 | - ["PSo16NSObjectProtocol", "onSaveImage"] 347 | - !private ["PSo16NSObjectProtocol", "stickerView"] 348 | - ["PSo16NSObjectProtocol", "textAlphaArray"] 349 | - !private ["PSo16NSObjectProtocol", "view"] 350 | - ["PSo16NSObjectProtocol", "viewDidLoad"] 351 | - ["PSo16NSObjectProtocol", "whiteColor"] 352 | - ["PSo16NSObjectProtocol", "yellowColor"] 353 | - ["PSo16NSObjectProtocol", ""] 354 | - ["PSo14NSSecureCoding", "blackColor"] 355 | - ["PSo14NSSecureCoding", "whiteColor"] 356 | - ["PSo14NSSecureCoding", "yellowColor"] 357 | - !private ["Ps21RandomAccessIndexType", "Distance"] 358 | - !private ["Ps21RandomAccessIndexType", "IntegerLiteralType"] 359 | - !private ["Ps21RandomAccessIndexType", "init"] 360 | - ["Ps30RangeReplaceableCollectionType", "Element"] 361 | - !private ["Ps30RangeReplaceableCollectionType", "Generator"] 362 | - !private ["Ps30RangeReplaceableCollectionType", "Index"] 363 | - !private ["Ps30RangeReplaceableCollectionType", "SubSequence"] 364 | - !private ["Ps30RangeReplaceableCollectionType", "subscript"] 365 | - ["Ps12SequenceType", "Element"] 366 | - !private ["Ps12SequenceType", "Generator"] 367 | - !private ["Ps12SequenceType", "Index"] 368 | - !private ["Ps12SequenceType", "SubSequence"] 369 | - !private ["Ps12SequenceType", "_Element"] 370 | - !private ["Ps12SequenceType", "subscript"] 371 | - !private ["Ps17SignedIntegerType", "Distance"] 372 | - !private ["Ps17SignedIntegerType", "IntegerLiteralType"] 373 | - !private ["Ps17SignedIntegerType", "init"] 374 | - !private ["Ps16SignedNumberType", "Distance"] 375 | - !private ["Ps16SignedNumberType", "IntegerLiteralType"] 376 | - !private ["Ps16SignedNumberType", "init"] 377 | - !private ["Vs5Slice", "Generator"] 378 | - !private ["Vs5Slice", "Index"] 379 | - !private ["Vs5Slice", "SubSequence"] 380 | - !private ["Vs5Slice", "_Element"] 381 | - !private ["Ps10Strideable", "Distance"] 382 | - !private ["Ps10Strideable", "IntegerLiteralType"] 383 | - !private ["Ps10Strideable", "init"] 384 | - !private ["PSo29UIAccessibilityIdentification", "center"] 385 | - !private ["PSo12UIAppearance", "center"] 386 | - !private ["PSo21UIAppearanceContainer", "CGFloat"] 387 | - !private ["PSo21UIAppearanceContainer", "Int"] 388 | - ["PSo21UIAppearanceContainer", "UIColor"] 389 | - !private ["PSo21UIAppearanceContainer", "UIImageWriteToSavedPhotosAlbum"] 390 | - !private ["PSo21UIAppearanceContainer", "arc4random_uniform"] 391 | - !private ["PSo21UIAppearanceContainer", "center"] 392 | - ["PSo21UIAppearanceContainer", "colorsArray"] 393 | - ["PSo21UIAppearanceContainer", "didReceiveMemoryWarning"] 394 | - ["PSo21UIAppearanceContainer", "fontNamesArray"] 395 | - ["PSo21UIAppearanceContainer", "init"] 396 | - ["PSo21UIAppearanceContainer", "onAddLabel"] 397 | - ["PSo21UIAppearanceContainer", "onRefreshColor"] 398 | - ["PSo21UIAppearanceContainer", "onRefreshFont"] 399 | - ["PSo21UIAppearanceContainer", "onRefreshTextAlpha"] 400 | - ["PSo21UIAppearanceContainer", "onSaveImage"] 401 | - !private ["PSo21UIAppearanceContainer", "stickerView"] 402 | - ["PSo21UIAppearanceContainer", "textAlphaArray"] 403 | - !private ["PSo21UIAppearanceContainer", "view"] 404 | - ["PSo21UIAppearanceContainer", "viewDidLoad"] 405 | - ["PSo21UIAppearanceContainer", ""] 406 | - ["CSo7UIColor", "blackColor"] 407 | - ["CSo7UIColor", "whiteColor"] 408 | - ["CSo7UIColor", "yellowColor"] 409 | - !private ["PSo18UIContentContainer", "CGFloat"] 410 | - !private ["PSo18UIContentContainer", "Int"] 411 | - ["PSo18UIContentContainer", "UIColor"] 412 | - !private ["PSo18UIContentContainer", "UIImageWriteToSavedPhotosAlbum"] 413 | - !private ["PSo18UIContentContainer", "arc4random_uniform"] 414 | - ["PSo18UIContentContainer", "colorsArray"] 415 | - ["PSo18UIContentContainer", "didReceiveMemoryWarning"] 416 | - ["PSo18UIContentContainer", "fontNamesArray"] 417 | - ["PSo18UIContentContainer", "init"] 418 | - ["PSo18UIContentContainer", "onAddLabel"] 419 | - ["PSo18UIContentContainer", "onRefreshColor"] 420 | - ["PSo18UIContentContainer", "onRefreshFont"] 421 | - ["PSo18UIContentContainer", "onRefreshTextAlpha"] 422 | - ["PSo18UIContentContainer", "onSaveImage"] 423 | - !private ["PSo18UIContentContainer", "stickerView"] 424 | - ["PSo18UIContentContainer", "textAlphaArray"] 425 | - !private ["PSo18UIContentContainer", "view"] 426 | - ["PSo18UIContentContainer", "viewDidLoad"] 427 | - ["PSo18UIContentContainer", ""] 428 | - !private ["PSo17UICoordinateSpace", "center"] 429 | - !private ["PSo13UIDynamicItem", "center"] 430 | - !private ["PSo18UIFocusEnvironment", "CGFloat"] 431 | - !private ["PSo18UIFocusEnvironment", "Int"] 432 | - ["PSo18UIFocusEnvironment", "UIColor"] 433 | - !private ["PSo18UIFocusEnvironment", "UIImageWriteToSavedPhotosAlbum"] 434 | - !private ["PSo18UIFocusEnvironment", "arc4random_uniform"] 435 | - !private ["PSo18UIFocusEnvironment", "center"] 436 | - ["PSo18UIFocusEnvironment", "colorsArray"] 437 | - ["PSo18UIFocusEnvironment", "didReceiveMemoryWarning"] 438 | - ["PSo18UIFocusEnvironment", "fontNamesArray"] 439 | - ["PSo18UIFocusEnvironment", "init"] 440 | - ["PSo18UIFocusEnvironment", "onAddLabel"] 441 | - ["PSo18UIFocusEnvironment", "onRefreshColor"] 442 | - ["PSo18UIFocusEnvironment", "onRefreshFont"] 443 | - ["PSo18UIFocusEnvironment", "onRefreshTextAlpha"] 444 | - ["PSo18UIFocusEnvironment", "onSaveImage"] 445 | - !private ["PSo18UIFocusEnvironment", "stickerView"] 446 | - ["PSo18UIFocusEnvironment", "textAlphaArray"] 447 | - !private ["PSo18UIFocusEnvironment", "view"] 448 | - ["PSo18UIFocusEnvironment", "viewDidLoad"] 449 | - ["PSo18UIFocusEnvironment", ""] 450 | - !private ["CSo11UIResponder", "CGFloat"] 451 | - !private ["CSo11UIResponder", "Int"] 452 | - ["CSo11UIResponder", "JLStickerImageView"] 453 | - ["CSo11UIResponder", "UIBarButtonItem"] 454 | - ["CSo11UIResponder", "UIColor"] 455 | - !private ["CSo11UIResponder", "UIImageWriteToSavedPhotosAlbum"] 456 | - !private ["CSo11UIResponder", "arc4random_uniform"] 457 | - !private ["CSo11UIResponder", "center"] 458 | - ["CSo11UIResponder", "colorsArray"] 459 | - ["CSo11UIResponder", "didReceiveMemoryWarning"] 460 | - ["CSo11UIResponder", "fontNamesArray"] 461 | - ["CSo11UIResponder", "init"] 462 | - ["CSo11UIResponder", "onAddLabel"] 463 | - ["CSo11UIResponder", "onRefreshColor"] 464 | - ["CSo11UIResponder", "onRefreshFont"] 465 | - ["CSo11UIResponder", "onRefreshTextAlpha"] 466 | - ["CSo11UIResponder", "onSaveImage"] 467 | - !private ["CSo11UIResponder", "stickerView"] 468 | - ["CSo11UIResponder", "textAlphaArray"] 469 | - !private ["CSo11UIResponder", "view"] 470 | - ["CSo11UIResponder", "viewDidLoad"] 471 | - !private ["PSo16UIStateRestoring", "CGFloat"] 472 | - !private ["PSo16UIStateRestoring", "Int"] 473 | - ["PSo16UIStateRestoring", "UIColor"] 474 | - !private ["PSo16UIStateRestoring", "UIImageWriteToSavedPhotosAlbum"] 475 | - !private ["PSo16UIStateRestoring", "arc4random_uniform"] 476 | - ["PSo16UIStateRestoring", "colorsArray"] 477 | - ["PSo16UIStateRestoring", "didReceiveMemoryWarning"] 478 | - ["PSo16UIStateRestoring", "fontNamesArray"] 479 | - ["PSo16UIStateRestoring", "init"] 480 | - ["PSo16UIStateRestoring", "onAddLabel"] 481 | - ["PSo16UIStateRestoring", "onRefreshColor"] 482 | - ["PSo16UIStateRestoring", "onRefreshFont"] 483 | - ["PSo16UIStateRestoring", "onRefreshTextAlpha"] 484 | - ["PSo16UIStateRestoring", "onSaveImage"] 485 | - !private ["PSo16UIStateRestoring", "stickerView"] 486 | - ["PSo16UIStateRestoring", "textAlphaArray"] 487 | - !private ["PSo16UIStateRestoring", "view"] 488 | - ["PSo16UIStateRestoring", "viewDidLoad"] 489 | - ["PSo16UIStateRestoring", ""] 490 | - !private ["PSo18UITraitEnvironment", "CGFloat"] 491 | - !private ["PSo18UITraitEnvironment", "Int"] 492 | - ["PSo18UITraitEnvironment", "UIColor"] 493 | - !private ["PSo18UITraitEnvironment", "UIImageWriteToSavedPhotosAlbum"] 494 | - !private ["PSo18UITraitEnvironment", "arc4random_uniform"] 495 | - !private ["PSo18UITraitEnvironment", "center"] 496 | - ["PSo18UITraitEnvironment", "colorsArray"] 497 | - ["PSo18UITraitEnvironment", "didReceiveMemoryWarning"] 498 | - ["PSo18UITraitEnvironment", "fontNamesArray"] 499 | - ["PSo18UITraitEnvironment", "init"] 500 | - ["PSo18UITraitEnvironment", "onAddLabel"] 501 | - ["PSo18UITraitEnvironment", "onRefreshColor"] 502 | - ["PSo18UITraitEnvironment", "onRefreshFont"] 503 | - ["PSo18UITraitEnvironment", "onRefreshTextAlpha"] 504 | - ["PSo18UITraitEnvironment", "onSaveImage"] 505 | - !private ["PSo18UITraitEnvironment", "stickerView"] 506 | - ["PSo18UITraitEnvironment", "textAlphaArray"] 507 | - !private ["PSo18UITraitEnvironment", "view"] 508 | - ["PSo18UITraitEnvironment", "viewDidLoad"] 509 | - ["PSo18UITraitEnvironment", ""] 510 | - !private ["CSo6UIView", "center"] 511 | - !private ["CSo16UIViewController", "CGFloat"] 512 | - !private ["CSo16UIViewController", "Int"] 513 | - ["CSo16UIViewController", "JLStickerImageView"] 514 | - ["CSo16UIViewController", "UIBarButtonItem"] 515 | - ["CSo16UIViewController", "UIColor"] 516 | - !private ["CSo16UIViewController", "UIImageWriteToSavedPhotosAlbum"] 517 | - !private ["CSo16UIViewController", "arc4random_uniform"] 518 | - ["CSo16UIViewController", "colorsArray"] 519 | - ["CSo16UIViewController", "didReceiveMemoryWarning"] 520 | - ["CSo16UIViewController", "fontNamesArray"] 521 | - ["CSo16UIViewController", "init"] 522 | - ["CSo16UIViewController", "onAddLabel"] 523 | - ["CSo16UIViewController", "onRefreshColor"] 524 | - ["CSo16UIViewController", "onRefreshFont"] 525 | - ["CSo16UIViewController", "onRefreshTextAlpha"] 526 | - ["CSo16UIViewController", "onSaveImage"] 527 | - !private ["CSo16UIViewController", "stickerView"] 528 | - ["CSo16UIViewController", "textAlphaArray"] 529 | - !private ["CSo16UIViewController", "view"] 530 | - ["CSo16UIViewController", "viewDidLoad"] 531 | - ["CSo16UIViewController", ""] 532 | - !private ["C7Example14ViewController", "CGFloat"] 533 | - !private ["C7Example14ViewController", "Int"] 534 | - ["C7Example14ViewController", "JLStickerImageView"] 535 | - ["C7Example14ViewController", "UIBarButtonItem"] 536 | - ["C7Example14ViewController", "UIColor"] 537 | - !private ["C7Example14ViewController", "UIImageWriteToSavedPhotosAlbum"] 538 | - !private ["C7Example14ViewController", "arc4random_uniform"] 539 | - ["C7Example14ViewController", "colorsArray"] 540 | - ["C7Example14ViewController", "deinit"] 541 | - ["C7Example14ViewController", "didReceiveMemoryWarning"] 542 | - ["C7Example14ViewController", "fontNamesArray"] 543 | - ["C7Example14ViewController", "init"] 544 | - ["C7Example14ViewController", "onAddLabel"] 545 | - ["C7Example14ViewController", "onRefreshColor"] 546 | - ["C7Example14ViewController", "onRefreshFont"] 547 | - ["C7Example14ViewController", "onRefreshTextAlpha"] 548 | - ["C7Example14ViewController", "onSaveImage"] 549 | - !private ["C7Example14ViewController", "stickerView"] 550 | - ["C7Example14ViewController", "textAlphaArray"] 551 | - !private ["C7Example14ViewController", "view"] 552 | - ["C7Example14ViewController", "viewDidLoad"] 553 | - ["Ps10_ArrayType", "Element"] 554 | - !private ["Ps10_ArrayType", "Generator"] 555 | - !private ["Ps10_ArrayType", "Index"] 556 | - !private ["Ps10_ArrayType", "SubSequence"] 557 | - !private ["Ps10_ArrayType", "subscript"] 558 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "Distance"] 559 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "IntegerLiteralType"] 560 | - !private ["Ps33_BuiltinIntegerLiteralConvertible", "init"] 561 | - !private ["Ps19_CVarArgAlignedType", "init"] 562 | - !private ["Ps22_CVarArgPassedAsDouble", "init"] 563 | - ["Ps24_ColorLiteralConvertible", "blackColor"] 564 | - ["Ps24_ColorLiteralConvertible", "whiteColor"] 565 | - ["Ps24_ColorLiteralConvertible", "yellowColor"] 566 | - ["Ps24_DestructorSafeContainer", "Element"] 567 | - !private ["Ps24_DestructorSafeContainer", "Generator"] 568 | - !private ["Ps24_DestructorSafeContainer", "Index"] 569 | - !private ["Ps24_DestructorSafeContainer", "SubSequence"] 570 | - !private ["Ps24_DestructorSafeContainer", "subscript"] 571 | - !private ["Ps14_Incrementable", "Distance"] 572 | - !private ["Ps14_Incrementable", "IntegerLiteralType"] 573 | - !private ["Ps14_Incrementable", "init"] 574 | - !private ["Ps22_IntegerArithmeticType", "Distance"] 575 | - !private ["Ps22_IntegerArithmeticType", "IntegerLiteralType"] 576 | - !private ["Ps22_IntegerArithmeticType", "init"] 577 | - !private ["Ps12_IntegerType", "Distance"] 578 | - !private ["Ps12_IntegerType", "IntegerLiteralType"] 579 | - !private ["Ps12_IntegerType", "init"] 580 | - !private ["Ps21_ObjectiveCBridgeable", "Distance"] 581 | - ["Ps21_ObjectiveCBridgeable", "Element"] 582 | - !private ["Ps21_ObjectiveCBridgeable", "Generator"] 583 | - !private ["Ps21_ObjectiveCBridgeable", "Index"] 584 | - !private ["Ps21_ObjectiveCBridgeable", "IntegerLiteralType"] 585 | - !private ["Ps21_ObjectiveCBridgeable", "SubSequence"] 586 | - !private ["Ps21_ObjectiveCBridgeable", "init"] 587 | - !private ["Ps21_ObjectiveCBridgeable", "subscript"] 588 | - !private ["Ps22_RandomAccessAmbiguity", "Distance"] 589 | - !private ["Ps22_RandomAccessAmbiguity", "IntegerLiteralType"] 590 | - !private ["Ps22_RandomAccessAmbiguity", "init"] 591 | - !private ["Ps12_Reflectable", "Distance"] 592 | - ["Ps12_Reflectable", "Element"] 593 | - !private ["Ps12_Reflectable", "Generator"] 594 | - !private ["Ps12_Reflectable", "Index"] 595 | - !private ["Ps12_Reflectable", "IntegerLiteralType"] 596 | - !private ["Ps12_Reflectable", "SubSequence"] 597 | - !private ["Ps12_Reflectable", "center"] 598 | - !private ["Ps12_Reflectable", "init"] 599 | - !private ["Ps12_Reflectable", "subscript"] 600 | - !private ["Ps18_SignedIntegerType", "Distance"] 601 | - !private ["Ps18_SignedIntegerType", "IntegerLiteralType"] 602 | - !private ["Ps18_SignedIntegerType", "init"] 603 | depends-nominal: 604 | - !private "Ps16AbsoluteValuable" 605 | - "Ps9AnyObject" 606 | - "Sa" 607 | - "Ps23ArrayLiteralConvertible" 608 | - !private "Vs10ArraySlice" 609 | - !private "Ps22BidirectionalIndexType" 610 | - !private "Ps21BitwiseOperationsType" 611 | - !private "V12CoreGraphics7CGFloat" 612 | - "Ps11CVarArgType" 613 | - "Ps14CollectionType" 614 | - !private "Ps10Comparable" 615 | - "Ps28CustomDebugStringConvertible" 616 | - "Ps23CustomStringConvertible" 617 | - "Ps9Equatable" 618 | - !private "Ps23FloatLiteralConvertible" 619 | - !private "Ps17FloatingPointType" 620 | - !private "Ps16ForwardIndexType" 621 | - !private "Ps13GeneratorType" 622 | - "Ps8Hashable" 623 | - "Ps9Indexable" 624 | - !private "Vs17IndexingGenerator" 625 | - !private "Si" 626 | - !private "Ps21IntegerArithmeticType" 627 | - !private "Ps25IntegerLiteralConvertible" 628 | - !private "Ps11IntegerType" 629 | - !private "Ps14MirrorPathType" 630 | - "Ps21MutableCollectionType" 631 | - "Ps16MutableIndexable" 632 | - "Ps16MutableSliceable" 633 | - "PSo8NSCoding" 634 | - "PSo9NSCopying" 635 | - "PSo26NSExtensionRequestHandling" 636 | - "CSo8NSObject" 637 | - "PSo16NSObjectProtocol" 638 | - "PSo14NSSecureCoding" 639 | - !private "Ps21RandomAccessIndexType" 640 | - "Ps30RangeReplaceableCollectionType" 641 | - "Ps12SequenceType" 642 | - !private "Ps17SignedIntegerType" 643 | - !private "Ps16SignedNumberType" 644 | - !private "Vs5Slice" 645 | - !private "Ps10Strideable" 646 | - !private "PSo29UIAccessibilityIdentification" 647 | - !private "PSo12UIAppearance" 648 | - "PSo21UIAppearanceContainer" 649 | - "CSo7UIColor" 650 | - "PSo18UIContentContainer" 651 | - !private "PSo17UICoordinateSpace" 652 | - !private "PSo13UIDynamicItem" 653 | - "PSo18UIFocusEnvironment" 654 | - "CSo11UIResponder" 655 | - "PSo16UIStateRestoring" 656 | - "PSo18UITraitEnvironment" 657 | - !private "CSo6UIView" 658 | - "CSo16UIViewController" 659 | - "C7Example14ViewController" 660 | - "Ps10_ArrayType" 661 | - !private "Ps33_BuiltinIntegerLiteralConvertible" 662 | - !private "Ps19_CVarArgAlignedType" 663 | - !private "Ps22_CVarArgPassedAsDouble" 664 | - "Ps24_ColorLiteralConvertible" 665 | - "Ps24_DestructorSafeContainer" 666 | - !private "Ps14_Incrementable" 667 | - !private "Ps22_IntegerArithmeticType" 668 | - !private "Ps12_IntegerType" 669 | - "Ps21_ObjectiveCBridgeable" 670 | - !private "Ps22_RandomAccessAmbiguity" 671 | - "Ps12_Reflectable" 672 | - !private "Ps18_SignedIntegerType" 673 | depends-dynamic-lookup: 674 | depends-external: 675 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Swift.swiftmodule" 676 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/UIKit.swiftmodule" 677 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Foundation.swiftmodule" 678 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Darwin.swiftmodule" 679 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/Dispatch.swiftmodule" 680 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/ObjectiveC.swiftmodule" 681 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreGraphics.swiftmodule" 682 | - "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator/x86_64/CoreImage.swiftmodule" 683 | interface-hash: "39e2525c68eb4e83dd68ba00b47ace26" 684 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Script-2654991302B78101DB904FB1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh" 3 | 4 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Script-A621D6B85F4D8F11DF6934AC.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null 3 | if [[ $? != 0 ]] ; then 4 | cat << EOM 5 | error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation. 6 | EOM 7 | exit 1 8 | fi 9 | 10 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/Script-E302DD593268B86DC01F08D8.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | "${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh" 3 | 4 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/dgph: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/dgph -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/dgph~: -------------------------------------------------------------------------------- 1 | DGPH1.04 Feb 23 201618:43:29 2 | /Usersapple Documents2computerscience&math&finance,project,learningNotescomputerscienceprojectJLStickerTextViewExample Example 3 | -------------------------------------------------------------------------------- /Example/Example/build/Example.build/Release-iphonesimulator/Example.build/swift-overrides.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Example/Example/build/Example.build/Release-iphonesimulator/Example.build/swift-overrides.hmap -------------------------------------------------------------------------------- /Inspector.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Inspector.png -------------------------------------------------------------------------------- /JLStickerTextView.podspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | Pod::Spec.new do |s| 4 | 5 | s.name = "JLStickerTextView" 6 | s.version = "0.1.2" 7 | s.summary = "add text(multiple line support) to imageView, edit, rotate or resize them as you want, then render the text on image" 8 | 9 | s.homepage = "https://github.com/luiyezheng/JLStickerTextView" 10 | 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | 13 | s.author = { "luiyezheng" => "luiyezheng@foxmail.com" } 14 | 15 | s.source = { :git => "https://github.com/luiyezheng/JLStickerTextView.git", :tag => "0.1.2" } 16 | 17 | s.platform = :ios, "10.0" 18 | 19 | s.source_files = "Source" 20 | 21 | s.requires_arc = false 22 | 23 | s.frameworks = "UIKit" 24 | 25 | end 26 | -------------------------------------------------------------------------------- /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 of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## About 2 | 3 | StickerTextView is an subclass of UIImageView. You can add multiple text to it, edit, rotate, resize the text as you want with one finger, then render the text on Image. 4 | 5 | ![](https://github.com/Textcat/JLStickerTextView/blob/master/demoScreenshot.jpg) 6 | 7 | ## Features 8 | * You can add multiple Text to StickerTextView at the same time 9 | * Multiple line Text support 10 | * Rotate, resize the text with one finger 11 | * Set the Color, alpha, font, alignment, TextShadow, lineSpacing...... of the text 12 | * StickerTextView also handle the process of rendering text on Image 13 | * Written in Swift 14 | 15 | ## Installation 16 | 17 | ### Manually 18 | Just drag the Source files into your project(**To get the latest version, please install manually**) 19 | 20 | ### CocoaPods 21 | To integrate StickerTextView into your Xcode project using CocoaPods, specify it in your Podfile and run `pod install`: 22 | 23 | ```Ruby 24 | use_frameworks! 25 | pod "JLStickerTextView", "~> 0.1.1" 26 | ``` 27 | To get the latest version: 28 | ```Ruby 29 | use_frameworks! 30 | pod "JLStickerTextView", :git => 31 | "https://github.com/Textcat/JLStickerTextView.git" 32 | ``` 33 | 34 | ## Usage 35 | 36 | ### Start 37 | 38 | First, import `JLStickerTextView`, then subclass the UIImageView, which you want to add text on, to JLStickerImageView, like this: 39 | 40 | ```Swift 41 | import JLStickerTextView 42 | class ViewController: UIViewController { 43 | @IBOutlet var stickerView: JLStickerImageView! 44 | } 45 | ``` 46 | 47 | If you use Storyboard, you also need connect the UIImageView to `JLStikcerImageView` Class in Identity Inspector. 48 | ![](https://github.com/Textcat/JLStickerTextView/blob/master/Inspector.png) 49 | 50 | ### Add new Label 51 | 52 | It is quite easy to add new label to current StickerImageView: 53 | ```Swift 54 | stickerView.addLabel() 55 | ``` 56 | 57 | ### Set the Label 58 | 59 | You can set the color, font , alignment, alpha.... of the label.(check all avaliable text attributes) 60 | 61 | 62 | ```Swift 63 | stickerView.textColor = UIColor.whiteColor() 64 | ``` 65 | 66 | **Note**: when you set the properties, you make change to the current selected TextLabel. 67 | 68 | ### Render Text on Image 69 | 70 | When you feel good, you are going to render the Text on Image and save the image: 71 | 72 | ```Swift 73 | let image = stickerView.renderTextOnView(stickerView) 74 | UIImageWriteToSavedPhotosAlbum(image!, nil, nil, nil) 75 | ``` 76 | 77 | ### Customize the StickerTextView appearance 78 | 79 | Customize stickerTextView appearance is very strightforward: 80 | 81 | ```swift 82 | //Set the image of close Button 83 | stickerView.currentlyEditingLabel.closeView!.image = UIImage(named: "cancel") 84 | //Set the image of rotate Button 85 | stickerView.currentlyEditingLabel.rotateView?.image = UIImage(named: "rotate") 86 | //Set the border color of textLabel 87 | stickerView.currentlyEditingLabel.border?.strokeColor = UIColor.redColor().CGColor 88 | 89 | ``` 90 | **Note**: `closeView` and `rotateView` are both UIimageView, while `border` is CAShapeLayer 91 | 92 | ### Scale stickerView proportionally 93 | 94 | This function is not complete yet, I just make it to fit my requirement. 95 | 96 | ``` 97 | stickerView.limitImageViewToSuperView() 98 | ``` 99 | 100 | When you render the text on UIImageView whose content mode is AspectFit, it is possible you will get some unwanted border. This function will scale UIImageView to fit the image. 101 | 102 |

Avaliable Text Attributes Reference(Let's add more 😉)

103 | 104 | |Key | `JLStickerImageView` Property | value Type | 105 | | ------------------------- | ------------------------------ | ------------- | 106 | | `Font` | `.fontName` | `String` | 107 | | `Alignment` | `.textAlignment` | `NSTextAlignment` | 108 | | `Alpha` | `.textAlpha` | `CGFloat ` | 109 | | `textColor` | `.textColor` | `UIColor` | 110 | | `lineSpacing` | `.lineSpacing` | `CGFloat` | 111 | |`TextShadow` | `.textShadowOffset` | `CGSize` | 112 | | | `.textShadowColor` | `UIColor` | 113 | | | `.textShadowBlur` | `CGFloat` | 114 | 115 | ## Contributon 116 | 117 | Any suggestion, request, pull are welcome. If you encounter any problem, feel free to create an issue. 118 | 119 | If you want to add more text attributes: 120 | 121 | 1. Please fork this project 122 | 2. Define the attribute you want in `JLAttributedTextView.swift` 123 | 3. implement user interface in `JLStickerImageVIew.swift` 124 | 4. Write appropriate docs and comments in the README.md 125 | 5. Submit a pull request 126 | 127 | ## Plan 128 | 129 | Here are some ideas: 130 | 131 | - [ ] More options for text(eg: lineSpacing) 132 | - [x] Interface to customize the appearance of StickerLabelView(close Button, rotate button, border,etc) 133 | - [ ] More general solution for Scaling stickerView proportionally 134 | - [ ] Support placeholder 135 | 136 | ## Reference 137 | 138 | Based on 139 | 140 | * [IQLabelView](https://github.com/kcandr/IQLabelView) 141 | 142 | Also inspired by 143 | 144 | * [TextDrawer](https://github.com/remirobert/TextDrawer) 145 | * [TextAttributes](https://github.com/delba/TextAttributes) 146 | 147 | -------------------------------------------------------------------------------- /Source/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/Source/.DS_Store -------------------------------------------------------------------------------- /Source/CalcuteFunctions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CalcuteFunctions.swift 3 | // stickerTextView 4 | // 5 | // Created by 刘业臻 on 16/4/20. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | class CalculateFunctions { 13 | static func CGRectGetCenter(_ rect: CGRect) -> CGPoint{ 14 | return CGPoint(x: rect.midX, y: rect.midY) 15 | } 16 | 17 | static func CGRectScale(_ rect: CGRect, wScale: CGFloat, hScale: CGFloat) -> CGRect { 18 | return CGRect(x: rect.origin.x * wScale, y: rect.origin.y * hScale, width: rect.size.width * wScale, height: rect.size.height * hScale) 19 | } 20 | 21 | static func CGpointGetDistance(_ point1: CGPoint, point2: CGPoint) -> CGFloat { 22 | let fx = point2.x - point1.x 23 | let fy = point2.y - point1.y 24 | 25 | return sqrt((fx * fx + fy * fy)) 26 | } 27 | 28 | static func CGAffineTrasformGetAngle(_ t: CGAffineTransform) -> CGFloat{ 29 | return atan2(t.b, t.a) 30 | } 31 | 32 | static func CGAffineTransformGetScale(_ t: CGAffineTransform) -> CGSize { 33 | return CGSize(width: sqrt(t.a * t.a + t.c + t.c), height: sqrt(t.b * t.b + t.d * t.d)) 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Source/JLAttributedTextView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JLAttributedTextView.swift 3 | // JLAttributesTextView 4 | // 5 | // Created by 刘业臻 on 16/4/24. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class JLAttributedTextView: UITextView { 12 | 13 | 14 | public private(set) var textAttributes: [NSAttributedStringKey: AnyObject] = [:] 15 | 16 | //MARK: - 17 | //MARK: Alpha 18 | public var textAlpha: CGFloat = 1 { 19 | didSet { 20 | textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor?.withAlphaComponent(textAlpha) 21 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 22 | } 23 | } 24 | 25 | //MARK: - 26 | //MARK: Font 27 | 28 | public var fontName: String = "HelveticaNeue" { 29 | didSet { 30 | let font = UIFont(name: fontName, size: fontSize) 31 | textAttributes[NSAttributedStringKey.font] = font 32 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 33 | 34 | self.font = font 35 | } 36 | } 37 | 38 | public var fontSize: CGFloat = 20 { 39 | didSet { 40 | let font = UIFont(name: fontName, size: fontSize) 41 | textAttributes[NSAttributedStringKey.font] = font 42 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 43 | 44 | self.font = font 45 | } 46 | } 47 | 48 | //MARK: - 49 | //MARK: forgroundColor 50 | 51 | public var foregroundColor: UIColor? { 52 | didSet { 53 | textAttributes[NSAttributedStringKey.foregroundColor] = foregroundColor 54 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 55 | } 56 | } 57 | 58 | //MARK: - 59 | //MARK: backgroundColor 60 | public var textBackgroundColor: UIColor? { 61 | didSet { 62 | self.layer.backgroundColor = textBackgroundColor?.cgColor 63 | //textAttributes[NSBackgroundColorAttributeName] = textBackgroundColor 64 | //self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 65 | } 66 | } 67 | 68 | public var textBackgroundAlpha: CGFloat? { 69 | didSet { 70 | //textAttributes[NSBackgroundColorAttributeName] = textBackgroundColor?.colorWithAlphaComponent(textBackgroundAlpha!) 71 | //self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 72 | self.layer.backgroundColor = textBackgroundColor?.withAlphaComponent(textBackgroundAlpha!).cgColor 73 | } 74 | } 75 | 76 | 77 | //MARK: - 78 | //MARK: Paragraph style 79 | 80 | public var paragraphStyle: NSMutableParagraphStyle = NSMutableParagraphStyle() { 81 | didSet { 82 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 83 | } 84 | } 85 | 86 | public var alignment: NSTextAlignment { 87 | get { 88 | return paragraphStyle.alignment 89 | } 90 | set { 91 | paragraphStyle.alignment = newValue 92 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 93 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 94 | 95 | } 96 | } 97 | 98 | public var lineSpacing: CGFloat { 99 | get { 100 | return paragraphStyle.lineSpacing 101 | } 102 | 103 | set { 104 | paragraphStyle.lineSpacing = newValue 105 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 106 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 107 | 108 | } 109 | } 110 | 111 | public var paragraphSpacing: CGFloat { 112 | get { 113 | return paragraphStyle.paragraphSpacing 114 | } 115 | 116 | set { 117 | paragraphStyle.paragraphSpacing = newValue 118 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 119 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 120 | } 121 | } 122 | 123 | #if os(iOS) || os(tvOS) 124 | //MARK: - 125 | //MARK: Shadow 126 | 127 | public var shadow: NSShadow? = NSShadow() { 128 | didSet { 129 | textAttributes[NSAttributedStringKey.shadow] = shadow 130 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 131 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 132 | } 133 | } 134 | 135 | public var textShadowOffset: CGSize! { 136 | didSet { 137 | shadow?.shadowOffset = textShadowOffset 138 | textAttributes[NSAttributedStringKey.shadow] = shadow 139 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 140 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 141 | 142 | } 143 | } 144 | 145 | public var textShadowColor: UIColor! { 146 | didSet { 147 | shadow?.shadowColor = textShadowColor 148 | textAttributes[NSAttributedStringKey.shadow] = shadow 149 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 150 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 151 | 152 | } 153 | } 154 | 155 | public var textShadowBlur: CGFloat! { 156 | didSet { 157 | shadow?.shadowBlurRadius = textShadowBlur 158 | textAttributes[NSAttributedStringKey.shadow] = shadow 159 | textAttributes[NSAttributedStringKey.paragraphStyle] = paragraphStyle 160 | self.attributedText = NSAttributedString(string: self.text, attributes: textAttributes) 161 | 162 | } 163 | } 164 | 165 | #endif 166 | 167 | } 168 | 169 | #if os(iOS) || os(tvOS) 170 | extension JLAttributedTextView { 171 | // MARK: - Shadow 172 | 173 | /** 174 | Sets the shadow attribute and returns the receiver. 175 | 176 | - parameter color: The color of the shadow. 177 | - parameter offset: The offset values of the shadow. 178 | - parameter blurRadius: The blur radius of the shadow. 179 | 180 | - returns: The receiver. 181 | */ 182 | public func shadow(color: AnyObject?, offset: CGSize, blurRadius: CGFloat) -> Self { 183 | return shadow({ 184 | let shadow = NSShadow() 185 | shadow.shadowColor = color 186 | shadow.shadowOffset = offset 187 | shadow.shadowBlurRadius = blurRadius 188 | return shadow 189 | }() as NSShadow) 190 | } 191 | 192 | /** 193 | Sets the shadow attribute and returns the receiver. 194 | 195 | - parameter shadow: The shadow. 196 | 197 | - returns: The receiver. 198 | */ 199 | public func shadow(_ shadow: NSShadow?) -> Self { 200 | self.shadow = shadow 201 | return self 202 | } 203 | 204 | 205 | } 206 | #endif 207 | 208 | //MARK: - 209 | //MARK: CGRect of Cursor 210 | 211 | extension JLAttributedTextView { 212 | override public func caretRect(for position: UITextPosition) -> CGRect { 213 | var originalRect = super.caretRect(for: position) 214 | originalRect.size.height = self.font!.pointSize - self.font!.descender 215 | // "descender" is expressed as a negative value, 216 | // so to add its height you must subtract its value 217 | 218 | return originalRect 219 | } 220 | 221 | } 222 | -------------------------------------------------------------------------------- /Source/JLStickerImageView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // stickerView.swift 3 | // stickerTextView 4 | // 5 | // Created by 刘业臻 on 16/4/20. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class JLStickerImageView: UIImageView, UIGestureRecognizerDelegate { 12 | public var currentlyEditingLabel: JLStickerLabelView! 13 | fileprivate var labels: [JLStickerLabelView]! 14 | private var renderedView: UIView! 15 | 16 | fileprivate lazy var tapOutsideGestureRecognizer: UITapGestureRecognizer! = { 17 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(JLStickerImageView.tapOutside)) 18 | tapGesture.delegate = self 19 | return tapGesture 20 | 21 | }() 22 | 23 | //MARK: - 24 | //MARK: init 25 | 26 | init() { 27 | super.init(frame: CGRect.zero) 28 | isUserInteractionEnabled = true 29 | labels = [] 30 | } 31 | 32 | override init(frame: CGRect) { 33 | super.init(frame: frame) 34 | isUserInteractionEnabled = true 35 | labels = [] 36 | } 37 | 38 | required public init?(coder aDecoder: NSCoder) { 39 | super.init(coder: aDecoder) 40 | isUserInteractionEnabled = true 41 | labels = [] 42 | } 43 | 44 | } 45 | 46 | //MARK: - 47 | //MARK: Functions 48 | extension JLStickerImageView { 49 | 50 | public func addLabel() { 51 | if let label: JLStickerLabelView = currentlyEditingLabel { 52 | label.hideEditingHandlers() 53 | } 54 | 55 | let labelFrame = CGRect(x: self.bounds.midX - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), 56 | y: self.bounds.midY - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), 57 | width: 60, height: 50) 58 | let labelView = JLStickerLabelView(frame: labelFrame) 59 | labelView.setupTextLabel() 60 | labelView.delegate = self 61 | labelView.showsContentShadow = false 62 | labelView.borderColor = UIColor.white 63 | // labelView.labelTextView?.fontName = "Roboto-Medium" 64 | self.addSubview(labelView) 65 | currentlyEditingLabel = labelView 66 | adjustsWidthToFillItsContens(currentlyEditingLabel) 67 | labels.append(labelView) 68 | 69 | self.addGestureRecognizer(tapOutsideGestureRecognizer) 70 | } 71 | 72 | public func addImage() { 73 | if let label: JLStickerLabelView = currentlyEditingLabel { 74 | label.hideEditingHandlers() 75 | } 76 | 77 | let labelFrame = CGRect(x: self.bounds.midX - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), 78 | y: self.bounds.midY - CGFloat(arc4random()).truncatingRemainder(dividingBy: 20), 79 | width: 60, height: 50) 80 | let labelView = JLStickerLabelView(frame: labelFrame) 81 | labelView.setupImageLabel() 82 | labelView.showsContentShadow = false 83 | labelView.borderColor = UIColor.white 84 | self.addSubview(labelView) 85 | currentlyEditingLabel = labelView 86 | adjustsWidthToFillItsContens(currentlyEditingLabel) 87 | labels.append(labelView) 88 | 89 | self.addGestureRecognizer(tapOutsideGestureRecognizer) 90 | } 91 | 92 | public func renderContentOnView() -> UIImage? { 93 | 94 | self.cleanup() 95 | 96 | UIGraphicsBeginImageContextWithOptions(self.bounds.size, true, 0) 97 | 98 | self.layer.render(in: UIGraphicsGetCurrentContext()!) 99 | let img = UIGraphicsGetImageFromCurrentImageContext() 100 | 101 | UIGraphicsEndImageContext() 102 | return img 103 | } 104 | 105 | public func limitImageViewToSuperView() { 106 | if self.superview == nil { 107 | return 108 | } 109 | guard let imageSize = self.image?.size else { 110 | return 111 | } 112 | self.translatesAutoresizingMaskIntoConstraints = true 113 | let aspectRatio = imageSize.width / imageSize.height 114 | 115 | if imageSize.width > imageSize.height { 116 | self.bounds.size.width = self.superview!.bounds.size.width 117 | self.bounds.size.height = self.superview!.bounds.size.width / aspectRatio 118 | }else { 119 | self.bounds.size.height = self.superview!.bounds.size.height 120 | self.bounds.size.width = self.superview!.bounds.size.height * aspectRatio 121 | } 122 | } 123 | 124 | // MARK: - 125 | 126 | func cleanup() { 127 | for label in labels { 128 | if let isEmpty = label.labelTextView?.text.isEmpty, isEmpty { 129 | label.closeTap(nil) 130 | } else { 131 | label.hideEditingHandlers() 132 | } 133 | } 134 | } 135 | } 136 | 137 | //MARK- 138 | //MARK: Gesture 139 | extension JLStickerImageView { 140 | @objc func tapOutside() { 141 | if let _: JLStickerLabelView = currentlyEditingLabel { 142 | currentlyEditingLabel.hideEditingHandlers() 143 | } 144 | 145 | } 146 | } 147 | 148 | //MARK- 149 | //MARK: stickerViewDelegate 150 | extension JLStickerImageView: JLStickerLabelViewDelegate { 151 | public func labelViewDidBeginEditing(_ label: JLStickerLabelView) { 152 | //labels.removeObject(label) 153 | 154 | } 155 | 156 | public func labelViewDidClose(_ label: JLStickerLabelView) { 157 | 158 | } 159 | 160 | public func labelViewDidShowEditingHandles(_ label: JLStickerLabelView) { 161 | currentlyEditingLabel = label 162 | 163 | } 164 | 165 | public func labelViewDidHideEditingHandles(_ label: JLStickerLabelView) { 166 | currentlyEditingLabel = nil 167 | 168 | } 169 | 170 | public func labelViewDidStartEditing(_ label: JLStickerLabelView) { 171 | currentlyEditingLabel = label 172 | 173 | } 174 | 175 | public func labelViewDidChangeEditing(_ label: JLStickerLabelView) { 176 | 177 | } 178 | 179 | public func labelViewDidEndEditing(_ label: JLStickerLabelView) { 180 | 181 | 182 | } 183 | 184 | public func labelViewDidSelected(_ label: JLStickerLabelView) { 185 | for labelItem in labels { 186 | labelItem.hideEditingHandlers() 187 | } 188 | label.showEditingHandles() 189 | } 190 | 191 | } 192 | 193 | //MARK: - 194 | //MARK: Set propeties 195 | 196 | extension JLStickerImageView: adjustFontSizeToFillRectProtocol { 197 | 198 | public enum textShadowPropterties { 199 | case offSet(CGSize) 200 | case color(UIColor) 201 | case blurRadius(CGFloat) 202 | } 203 | 204 | public var fontName: String! { 205 | set { 206 | if self.currentlyEditingLabel != nil { 207 | self.currentlyEditingLabel.labelTextView?.fontName = newValue 208 | adjustsWidthToFillItsContens(currentlyEditingLabel) 209 | } 210 | } 211 | get { 212 | return self.currentlyEditingLabel.labelTextView?.fontName 213 | } 214 | } 215 | 216 | public var textColor: UIColor! { 217 | set { 218 | if self.currentlyEditingLabel != nil { 219 | self.currentlyEditingLabel.labelTextView?.foregroundColor = newValue 220 | } 221 | } 222 | get { 223 | return self.currentlyEditingLabel.labelTextView?.foregroundColor 224 | } 225 | } 226 | 227 | public var textAlpha: CGFloat! { 228 | set { 229 | if self.currentlyEditingLabel != nil { 230 | self.currentlyEditingLabel.labelTextView?.textAlpha = newValue 231 | } 232 | 233 | } 234 | get { 235 | return self.currentlyEditingLabel.labelTextView?.textAlpha 236 | } 237 | } 238 | 239 | //MARK: - 240 | //MARK: text Format 241 | 242 | public var textAlignment: NSTextAlignment! { 243 | set { 244 | if self.currentlyEditingLabel != nil { 245 | self.currentlyEditingLabel.labelTextView?.alignment = newValue 246 | } 247 | 248 | } 249 | get { 250 | return self.currentlyEditingLabel.labelTextView?.alignment 251 | } 252 | } 253 | 254 | public var lineSpacing: CGFloat! { 255 | set { 256 | if self.currentlyEditingLabel != nil { 257 | self.currentlyEditingLabel.labelTextView?.lineSpacing = newValue 258 | adjustsWidthToFillItsContens(currentlyEditingLabel) 259 | } 260 | 261 | } 262 | get { 263 | return self.currentlyEditingLabel.labelTextView?.lineSpacing 264 | 265 | } 266 | } 267 | 268 | //MARK: - 269 | //MARK: text Background 270 | 271 | public var textBackgroundColor: UIColor! { 272 | set { 273 | if self.currentlyEditingLabel != nil { 274 | self.currentlyEditingLabel.labelTextView?.textBackgroundColor = newValue 275 | } 276 | 277 | } 278 | 279 | get { 280 | return self.currentlyEditingLabel.labelTextView?.textBackgroundColor 281 | } 282 | } 283 | 284 | public var textBackgroundAlpha: CGFloat! { 285 | set { 286 | if self.currentlyEditingLabel != nil { 287 | self.currentlyEditingLabel.labelTextView?.textBackgroundAlpha = newValue 288 | } 289 | 290 | } 291 | get { 292 | return self.currentlyEditingLabel.labelTextView?.textBackgroundAlpha 293 | 294 | } 295 | } 296 | 297 | //MARK: - 298 | //MARK: text shadow 299 | 300 | public var textShadowOffset: CGSize! { 301 | set { 302 | if self.currentlyEditingLabel != nil { 303 | self.currentlyEditingLabel.labelTextView?.textShadowOffset = newValue 304 | } 305 | 306 | } 307 | get { 308 | return self.currentlyEditingLabel.labelTextView?.shadow?.shadowOffset 309 | } 310 | } 311 | 312 | public var textShadowColor: UIColor! { 313 | set { 314 | if self.currentlyEditingLabel != nil { 315 | self.currentlyEditingLabel.labelTextView?.textShadowColor = newValue 316 | } 317 | 318 | } 319 | get { 320 | return (self.currentlyEditingLabel.labelTextView?.shadow?.shadowColor) as? UIColor 321 | } 322 | } 323 | 324 | public var textShadowBlur: CGFloat! { 325 | set { 326 | if self.currentlyEditingLabel != nil { 327 | self.currentlyEditingLabel.labelTextView?.textShadowBlur = newValue 328 | } 329 | 330 | } 331 | get { 332 | return self.currentlyEditingLabel.labelTextView?.shadow?.shadowBlurRadius 333 | } 334 | } 335 | } 336 | -------------------------------------------------------------------------------- /Source/JLStickerLabelView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // JLStickerLabelView.swift 3 | // stickerTextView 4 | // 5 | // Created by 刘业臻 on 16/4/19. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class JLStickerLabelView: UIView { 12 | //MARK: - 13 | //MARK: Gestures 14 | 15 | fileprivate lazy var moveGestureRecognizer: UIPanGestureRecognizer! = { 16 | let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(JLStickerLabelView.moveGesture(_:))) 17 | panRecognizer.delegate = self 18 | return panRecognizer 19 | }() 20 | 21 | fileprivate lazy var singleTapShowHide: UITapGestureRecognizer! = { 22 | let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(JLStickerLabelView.contentTapped(_:))) 23 | tapRecognizer.delegate = self 24 | return tapRecognizer 25 | }() 26 | 27 | fileprivate lazy var closeTap: UITapGestureRecognizer! = { 28 | let tapRecognizer = UITapGestureRecognizer(target: self, action: (#selector(JLStickerLabelView.closeTap(_:)))) 29 | tapRecognizer.delegate = self 30 | return tapRecognizer 31 | }() 32 | 33 | fileprivate lazy var panRotateGesture: UIPanGestureRecognizer! = { 34 | let panRecognizer = UIPanGestureRecognizer(target: self, action: #selector(JLStickerLabelView.rotateViewPanGesture(_:))) 35 | panRecognizer.delegate = self 36 | return panRecognizer 37 | }() 38 | 39 | //MARK: - 40 | //MARK: properties 41 | 42 | fileprivate var lastTouchedView: JLStickerLabelView? 43 | 44 | var delegate: JLStickerLabelViewDelegate? 45 | 46 | fileprivate var globalInset: CGFloat? 47 | 48 | fileprivate var initialBounds: CGRect? 49 | fileprivate var initialDistance: CGFloat? 50 | 51 | fileprivate var beginningPoint: CGPoint? 52 | fileprivate var beginningCenter: CGPoint? 53 | 54 | fileprivate var touchLocation: CGPoint? 55 | 56 | fileprivate var deltaAngle: CGFloat? 57 | fileprivate var beginBounds: CGRect? 58 | 59 | public var border: CAShapeLayer? 60 | public var labelTextView: JLAttributedTextView? 61 | public var rotateView: UIImageView? 62 | public var closeView: UIImageView? 63 | public var imageView: UIImageView? 64 | 65 | fileprivate var isShowingEditingHandles = true 66 | 67 | public var borderColor: UIColor? { 68 | didSet { 69 | border?.strokeColor = borderColor?.cgColor 70 | } 71 | } 72 | 73 | 74 | //MARK: - 75 | //MARK: Set Control Buttons 76 | 77 | public var enableClose: Bool = true { 78 | didSet { 79 | closeView?.isHidden = enableClose 80 | closeView?.isUserInteractionEnabled = enableClose 81 | } 82 | } 83 | public var enableRotate: Bool = true { 84 | didSet { 85 | rotateView?.isHidden = enableRotate 86 | rotateView?.isUserInteractionEnabled = enableRotate 87 | } 88 | } 89 | public var enableMoveRestriction: Bool = true { 90 | didSet { 91 | 92 | } 93 | } 94 | public var showsContentShadow: Bool = false { 95 | didSet { 96 | if showsContentShadow { 97 | self.layer.shadowColor = UIColor.black.cgColor 98 | self.layer.shadowOffset = CGSize(width: 0, height: 5) 99 | self.layer.shadowOpacity = 1.0 100 | self.layer.shadowRadius = 4.0 101 | }else { 102 | self.layer.shadowColor = UIColor.clear.cgColor 103 | self.layer.shadowOffset = CGSize.zero 104 | self.layer.shadowOpacity = 0.0 105 | self.layer.shadowRadius = 0.0 106 | } 107 | } 108 | } 109 | 110 | //MARK: - 111 | //MARK: didMoveToSuperView 112 | 113 | override public func didMoveToSuperview() { 114 | super.didMoveToSuperview() 115 | if self.superview != nil { 116 | self.showEditingHandles() 117 | self.refresh() 118 | } 119 | 120 | } 121 | 122 | //MARK: - 123 | //MARK: init 124 | 125 | init() { 126 | super.init(frame: CGRect.zero) 127 | // setup() 128 | // adjustsWidthToFillItsContens(self) 129 | } 130 | 131 | override init(frame: CGRect) { 132 | super.init(frame: frame) 133 | 134 | if frame.size.width < 25 { 135 | self.bounds.size.width = 25 136 | } 137 | 138 | if frame.size.height < 25 { 139 | self.bounds.size.height = 25 140 | } 141 | 142 | // self.setup() 143 | // adjustsWidthToFillItsContens(self) 144 | } 145 | 146 | required public init?(coder aDecoder: NSCoder) { 147 | super.init(coder: aDecoder) 148 | // setup() 149 | // adjustsWidthToFillItsContens(self) 150 | 151 | } 152 | 153 | public override func layoutSubviews() { 154 | if labelTextView != nil { 155 | border?.path = UIBezierPath(rect: labelTextView!.bounds).cgPath 156 | border?.frame = labelTextView!.bounds 157 | } else if imageView != nil { 158 | border?.path = UIBezierPath(rect: imageView!.bounds).cgPath 159 | border?.frame = imageView!.bounds 160 | } 161 | } 162 | 163 | private func setup() { 164 | 165 | self.setupCloseAndRotateView() 166 | 167 | self.addGestureRecognizer(moveGestureRecognizer) 168 | self.addGestureRecognizer(singleTapShowHide) 169 | self.moveGestureRecognizer.require(toFail: closeTap) 170 | 171 | self.closeView!.addGestureRecognizer(closeTap) 172 | self.rotateView!.addGestureRecognizer(panRotateGesture) 173 | 174 | self.enableMoveRestriction = true 175 | self.enableClose = true 176 | self.enableRotate = true 177 | self.showsContentShadow = true 178 | 179 | self.showEditingHandles() 180 | 181 | adjustsWidthToFillItsContens(self) 182 | } 183 | 184 | func setupTextLabel() { 185 | self.globalInset = 19 186 | 187 | self.backgroundColor = UIColor.clear 188 | self.autoresizingMask = [.flexibleHeight, .flexibleWidth] 189 | self.border?.strokeColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1).cgColor 190 | 191 | self.setupLabelTextView() 192 | self.setupBorder() 193 | 194 | self.insertSubview(labelTextView!, at: 0) 195 | 196 | self.setup() 197 | 198 | adjustsWidthToFillItsContens(self) 199 | } 200 | 201 | func setupImageLabel() { 202 | self.globalInset = 19 203 | 204 | self.backgroundColor = UIColor.clear 205 | self.autoresizingMask = [.flexibleHeight, .flexibleWidth] 206 | self.border?.strokeColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1).cgColor 207 | 208 | self.setupImageView() 209 | self.setupBorder() 210 | 211 | self.insertSubview(imageView!, at: 0) 212 | 213 | self.setup() 214 | 215 | var viewFrame = self.bounds 216 | viewFrame.size.width = 100 217 | viewFrame.size.height = 100 218 | self.bounds = viewFrame 219 | } 220 | } 221 | 222 | //MARK: - 223 | //MARK: labelTextViewDelegate 224 | 225 | extension JLStickerLabelView: UITextViewDelegate { 226 | public func textViewShouldBeginEditing(_ textView: UITextView) -> Bool { 227 | if (isShowingEditingHandles) { 228 | return true 229 | } 230 | return false 231 | } 232 | 233 | public func textViewDidBeginEditing(_ textView: UITextView) { 234 | 235 | if let delegate: JLStickerLabelViewDelegate = delegate { 236 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidStartEditing(_:))) { 237 | delegate.labelViewDidStartEditing!(self) 238 | } 239 | } 240 | } 241 | 242 | public func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool { 243 | if (!isShowingEditingHandles) { 244 | self.showEditingHandles() 245 | } 246 | //if textView.text != "" { 247 | //adjustsWidthToFillItsContens(self, labelView: labelTextView) 248 | //} 249 | 250 | return true 251 | } 252 | 253 | public func textViewDidChange(_ textView: UITextView) { 254 | if textView.text != "" { 255 | if labelTextView != nil { 256 | adjustsWidthToFillItsContens(self) 257 | labelTextView!.attributedText = NSAttributedString(string: labelTextView!.text, attributes: labelTextView!.textAttributes) 258 | } 259 | 260 | 261 | } 262 | } 263 | } 264 | //MARK: - 265 | //MARK: GestureRecognizer 266 | 267 | extension JLStickerLabelView: UIGestureRecognizerDelegate, adjustFontSizeToFillRectProtocol { 268 | public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { 269 | if gestureRecognizer == singleTapShowHide { 270 | return true 271 | } 272 | return false 273 | } 274 | 275 | 276 | @objc func contentTapped(_ recognizer: UITapGestureRecognizer) { 277 | if !isShowingEditingHandles { 278 | self.showEditingHandles() 279 | 280 | if let delegate: JLStickerLabelViewDelegate = delegate { 281 | delegate.labelViewDidSelected!(self) 282 | } 283 | } 284 | 285 | } 286 | 287 | @objc func closeTap(_ recognizer: UITapGestureRecognizer?) { 288 | self.removeFromSuperview() 289 | 290 | if let delegate: JLStickerLabelViewDelegate = delegate { 291 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidClose(_:))) { 292 | delegate.labelViewDidClose!(self) 293 | } 294 | } 295 | } 296 | 297 | @objc func moveGesture(_ recognizer: UIPanGestureRecognizer) { 298 | if !isShowingEditingHandles { 299 | self.showEditingHandles() 300 | 301 | if let delegate: JLStickerLabelViewDelegate = delegate { 302 | delegate.labelViewDidSelected!(self) 303 | } 304 | } 305 | 306 | self.touchLocation = recognizer.location(in: self.superview) 307 | 308 | switch recognizer.state { 309 | case .began: 310 | beginningPoint = touchLocation 311 | beginningCenter = self.center 312 | 313 | self.center = self.estimatedCenter() 314 | beginBounds = self.bounds 315 | 316 | if let delegate: JLStickerLabelViewDelegate = delegate { 317 | delegate.labelViewDidBeginEditing!(self) 318 | } 319 | 320 | case .changed: 321 | self.center = self.estimatedCenter() 322 | 323 | 324 | if let delegate: JLStickerLabelViewDelegate = delegate { 325 | delegate.labelViewDidChangeEditing!(self) 326 | } 327 | 328 | case .ended: 329 | self.center = self.estimatedCenter() 330 | 331 | 332 | if let delegate: JLStickerLabelViewDelegate = delegate { 333 | delegate.labelViewDidEndEditing!(self) 334 | } 335 | 336 | default:break 337 | 338 | } 339 | } 340 | 341 | @objc func rotateViewPanGesture(_ recognizer: UIPanGestureRecognizer) { 342 | touchLocation = recognizer.location(in: self.superview) 343 | 344 | let center = CalculateFunctions.CGRectGetCenter(self.frame) 345 | 346 | switch recognizer.state { 347 | case .began: 348 | deltaAngle = atan2(touchLocation!.y - center.y, touchLocation!.x - center.x) - CalculateFunctions.CGAffineTrasformGetAngle(self.transform) 349 | initialBounds = self.bounds 350 | initialDistance = CalculateFunctions.CGpointGetDistance(center, point2: touchLocation!) 351 | 352 | if let delegate: JLStickerLabelViewDelegate = delegate { 353 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidBeginEditing(_:))) { 354 | delegate.labelViewDidBeginEditing!(self) 355 | } 356 | } 357 | 358 | case .changed: 359 | let ang = atan2(touchLocation!.y - center.y, touchLocation!.x - center.x) 360 | 361 | let angleDiff = deltaAngle! - ang 362 | self.transform = CGAffineTransform(rotationAngle: -angleDiff) 363 | self.layoutIfNeeded() 364 | 365 | //Finding scale between current touchPoint and previous touchPoint 366 | let scale = sqrtf(Float(CalculateFunctions.CGpointGetDistance(center, point2: touchLocation!)) / Float(initialDistance!)) 367 | let scaleRect = CalculateFunctions.CGRectScale(initialBounds!, wScale: CGFloat(scale), hScale: CGFloat(scale)) 368 | 369 | if scaleRect.size.width >= (1 + globalInset! * 2) && scaleRect.size.height >= (1 + globalInset! * 2) && self.labelTextView?.text != "" { 370 | // if fontSize < 100 || CGRectGetWidth(scaleRect) < CGRectGetWidth(self.bounds) { 371 | if scale < 1 && (labelTextView?.fontSize ?? 0) <= 9 { 372 | 373 | }else { 374 | self.adjustFontSizeToFillRect(scaleRect, view: self) 375 | self.bounds = scaleRect 376 | self.adjustsWidthToFillItsContens(self) 377 | self.refresh() 378 | } 379 | } 380 | 381 | if let delegate: JLStickerLabelViewDelegate = delegate { 382 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidChangeEditing(_:))) { 383 | delegate.labelViewDidChangeEditing!(self) 384 | } 385 | } 386 | case .ended: 387 | if let delegate: JLStickerLabelViewDelegate = delegate { 388 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidEndEditing(_:))) { 389 | delegate.labelViewDidEndEditing!(self) 390 | } 391 | } 392 | 393 | self.refresh() 394 | 395 | //self.adjustsWidthToFillItsContens(self, labelView: labelTextView) 396 | default:break 397 | 398 | } 399 | } 400 | } 401 | 402 | //MARK: - 403 | //MARK: setup 404 | extension JLStickerLabelView { 405 | private func setupLabelTextView() { 406 | labelTextView = JLAttributedTextView(frame: self.bounds.insetBy(dx: globalInset!, dy: globalInset!)) 407 | labelTextView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] 408 | labelTextView?.clipsToBounds = true 409 | labelTextView?.delegate = self 410 | labelTextView?.backgroundColor = UIColor.clear 411 | labelTextView?.tintColor = UIColor(red: 33, green: 45, blue: 59, alpha: 1) 412 | labelTextView?.isScrollEnabled = false 413 | labelTextView?.isSelectable = true 414 | labelTextView?.textContainerInset = UIEdgeInsetsMake(0, 0, 0, 0) 415 | } 416 | 417 | private func setupBorder() { 418 | border = CAShapeLayer(layer: layer) 419 | border?.strokeColor = borderColor?.cgColor 420 | border?.fillColor = nil 421 | border?.lineDashPattern = [10, 2] 422 | border?.lineWidth = 1 423 | 424 | } 425 | 426 | private func setupCloseAndRotateView() { 427 | closeView = UIImageView(frame: CGRect(x: 0, y: 0, width: globalInset! * 2 - 6, height: globalInset! * 2 - 6)) 428 | closeView?.autoresizingMask = [.flexibleRightMargin, .flexibleBottomMargin] 429 | closeView?.contentMode = .scaleAspectFit 430 | closeView?.clipsToBounds = true 431 | closeView?.backgroundColor = UIColor.clear 432 | closeView?.isUserInteractionEnabled = true 433 | self.addSubview(closeView!) 434 | 435 | rotateView = UIImageView(frame: CGRect(x: self.bounds.size.width - globalInset! * 2, y: self.bounds.size.height - globalInset! * 2, width: globalInset! * 2 - 6, height: globalInset! * 2 - 6)) 436 | rotateView?.autoresizingMask = [.flexibleLeftMargin, .flexibleTopMargin] 437 | rotateView?.backgroundColor = UIColor.clear 438 | rotateView?.clipsToBounds = true 439 | rotateView?.contentMode = .scaleAspectFit 440 | rotateView?.isUserInteractionEnabled = true 441 | self.addSubview(rotateView!) 442 | } 443 | 444 | private func setupImageView() { 445 | imageView = UIImageView(frame: self.bounds.insetBy(dx: globalInset!, dy: globalInset!)) 446 | imageView?.autoresizingMask = [.flexibleWidth, .flexibleHeight] 447 | imageView?.contentMode = .scaleAspectFit 448 | imageView?.clipsToBounds = true 449 | imageView?.backgroundColor = UIColor.clear 450 | } 451 | } 452 | 453 | 454 | //MARK: - 455 | //MARK: Help funcitons 456 | extension JLStickerLabelView { 457 | 458 | fileprivate func refresh() { 459 | if let superView: UIView = self.superview { 460 | let transform: CGAffineTransform = superView.transform 461 | let scale = CalculateFunctions.CGAffineTransformGetScale(transform) 462 | let t = CGAffineTransform(scaleX: scale.width, y: scale.height) 463 | self.closeView?.transform = t.inverted() 464 | self.rotateView?.transform = t.inverted() 465 | 466 | if (isShowingEditingHandles) { 467 | if let border: CALayer = border { 468 | self.labelTextView?.layer.addSublayer(border) 469 | self.imageView?.layer.addSublayer(border) 470 | } 471 | }else { 472 | border?.removeFromSuperlayer() 473 | } 474 | } 475 | } 476 | 477 | public func hideEditingHandlers() { 478 | lastTouchedView = nil 479 | 480 | isShowingEditingHandles = false 481 | 482 | if enableClose { 483 | closeView?.isHidden = true 484 | } 485 | if enableRotate { 486 | rotateView?.isHidden = true 487 | } 488 | 489 | labelTextView?.resignFirstResponder() 490 | 491 | self.refresh() 492 | 493 | if let delegate : JLStickerLabelViewDelegate = delegate { 494 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidHideEditingHandles(_:))) { 495 | delegate.labelViewDidHideEditingHandles!(self) 496 | } 497 | } 498 | } 499 | 500 | public func showEditingHandles() { 501 | lastTouchedView?.hideEditingHandlers() 502 | 503 | isShowingEditingHandles = true 504 | 505 | lastTouchedView = self 506 | 507 | if enableClose { 508 | closeView?.isHidden = false 509 | } 510 | 511 | if enableRotate { 512 | rotateView?.isHidden = false 513 | } 514 | 515 | self.refresh() 516 | 517 | if let delegate: JLStickerLabelViewDelegate = delegate { 518 | if delegate.responds(to: #selector(JLStickerLabelViewDelegate.labelViewDidShowEditingHandles(_:))) { 519 | delegate.labelViewDidShowEditingHandles!(self) 520 | } 521 | } 522 | } 523 | 524 | fileprivate func estimatedCenter() -> CGPoint{ 525 | let newCenter: CGPoint! 526 | var newCenterX = beginningCenter!.x + (touchLocation!.x - beginningPoint!.x) 527 | var newCenterY = beginningCenter!.y + (touchLocation!.y - beginningPoint!.y) 528 | 529 | if (enableMoveRestriction) { 530 | if (!(newCenterX - 0.5 * self.frame.width > 0 && 531 | newCenterX + 0.5 * self.frame.width < self.superview!.bounds.width)) { 532 | newCenterX = self.center.x; 533 | } 534 | if (!(newCenterY - 0.5 * self.frame.height > 0 && 535 | newCenterY + 0.5 * self.frame.height < self.superview!.bounds.height)) { 536 | newCenterY = self.center.y; 537 | } 538 | newCenter = CGPoint(x: newCenterX, y: newCenterY) 539 | }else { 540 | newCenter = CGPoint(x: newCenterX, y: newCenterY) 541 | } 542 | return newCenter 543 | } 544 | } 545 | 546 | //MARK: - 547 | //MARK: delegate 548 | 549 | 550 | @objc public protocol JLStickerLabelViewDelegate: NSObjectProtocol { 551 | /** 552 | * Occurs when a touch gesture event occurs on close button. 553 | * 554 | * @param label A label object informing the delegate about action. 555 | */ 556 | @objc optional func labelViewDidClose(_ label: JLStickerLabelView) -> Void 557 | /** 558 | * Occurs when border and control buttons was shown. 559 | * 560 | * @param label A label object informing the delegate about showing. 561 | */ 562 | @objc optional func labelViewDidShowEditingHandles(_ label: JLStickerLabelView) -> Void 563 | /** 564 | * Occurs when border and control buttons was hidden. 565 | * 566 | * @param label A label object informing the delegate about hiding. 567 | */ 568 | @objc optional func labelViewDidHideEditingHandles(_ label: JLStickerLabelView) -> Void 569 | /** 570 | * Occurs when label become first responder. 571 | * 572 | * @param label A label object informing the delegate about action. 573 | */ 574 | @objc optional func labelViewDidStartEditing(_ label: JLStickerLabelView) -> Void 575 | /** 576 | * Occurs when label starts move or rotate. 577 | * 578 | * @param label A label object informing the delegate about action. 579 | */ 580 | @objc optional func labelViewDidBeginEditing(_ label: JLStickerLabelView) -> Void 581 | /** 582 | * Occurs when label continues move or rotate. 583 | * 584 | * @param label A label object informing the delegate about action. 585 | */ 586 | @objc optional func labelViewDidChangeEditing(_ label: JLStickerLabelView) -> Void 587 | /** 588 | * Occurs when label ends move or rotate. 589 | * 590 | * @param label A label object informing the delegate about action. 591 | */ 592 | @objc optional func labelViewDidEndEditing(_ label: JLStickerLabelView) -> Void 593 | 594 | @objc optional func labelViewDidSelected(_ label: JLStickerLabelView) -> Void 595 | } 596 | -------------------------------------------------------------------------------- /Source/adjustToFitFontOrWidth.swift: -------------------------------------------------------------------------------- 1 | // 2 | // adjustToFitFontOrWidth.swift 3 | // JLStickerTextView 4 | // 5 | // Created by 刘业臻 on 16/4/25. 6 | // Copyright © 2016年 luiyezheng. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | protocol adjustFontSizeToFillRectProtocol { 13 | 14 | func adjustFontSizeToFillRect(_ newBounds: CGRect, view: JLStickerLabelView) -> Void 15 | func adjustsWidthToFillItsContens(_ view: JLStickerLabelView) -> Void 16 | 17 | } 18 | 19 | extension adjustFontSizeToFillRectProtocol { 20 | func adjustFontSizeToFillRect(_ newBounds: CGRect, view: JLStickerLabelView) { 21 | guard let labelTextView = view.labelTextView else { 22 | return 23 | } 24 | var mid: CGFloat = 0.0 25 | var stickerMaximumFontSize: CGFloat = 200.0 26 | var stickerMinimumFontSize: CGFloat = 15.0 27 | var difference: CGFloat = 0.0 28 | 29 | var tempFont = UIFont(name: labelTextView.fontName, size: labelTextView.fontSize) 30 | var copyTextAttributes = labelTextView.textAttributes 31 | copyTextAttributes[NSAttributedStringKey.font] = tempFont 32 | var attributedText = NSAttributedString(string: labelTextView.text, attributes: copyTextAttributes) 33 | 34 | while stickerMinimumFontSize <= stickerMaximumFontSize { 35 | mid = stickerMinimumFontSize + (stickerMaximumFontSize - stickerMinimumFontSize) / 2 36 | tempFont = UIFont(name: labelTextView.fontName, size: CGFloat(mid))! 37 | copyTextAttributes[NSAttributedStringKey.font] = tempFont 38 | attributedText = NSAttributedString(string: labelTextView.text, attributes: copyTextAttributes) 39 | 40 | difference = newBounds.height - attributedText.boundingRect(with: CGSize(width: newBounds.width - 24, height: CGFloat.greatestFiniteMagnitude), options: [.usesLineFragmentOrigin, .usesFontLeading], context: nil).height 41 | 42 | if (mid == stickerMinimumFontSize || mid == stickerMaximumFontSize) { 43 | if (difference < 0) { 44 | labelTextView.fontSize = mid - 1 45 | return 46 | } 47 | 48 | labelTextView.fontSize = mid 49 | return 50 | } 51 | 52 | if (difference < 0) { 53 | stickerMaximumFontSize = mid - 1 54 | }else if (difference > 0) { 55 | stickerMinimumFontSize = mid + 1 56 | }else { 57 | labelTextView.fontSize = mid 58 | return 59 | } 60 | } 61 | 62 | labelTextView.fontSize = mid 63 | return 64 | } 65 | 66 | func adjustsWidthToFillItsContens(_ view: JLStickerLabelView) { 67 | guard let labelTextView = view.labelTextView else { 68 | return 69 | } 70 | 71 | let attributedText = labelTextView.attributedText 72 | 73 | let recSize = attributedText?.boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: CGFloat.greatestFiniteMagnitude), options: .usesLineFragmentOrigin, context: nil) 74 | 75 | let w1 = (ceilf(Float((recSize?.size.width)!)) + 24 < 50) ? 50 : CGFloat(ceilf(Float((recSize?.size.width)!)) + 24) 76 | let h1 = (ceilf(Float((recSize?.size.height)!)) + 24 < 50) ? 50 : CGFloat(ceilf(Float((recSize?.size.height)!)) + 24) 77 | 78 | var viewFrame = view.bounds 79 | viewFrame.size.width = w1 + 24 80 | viewFrame.size.height = h1 + 18 81 | view.bounds = viewFrame 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /demoScreenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Textcat/JLStickerTextView/45becbfeb0aa0dc2721fc31d1f900de40e187e78/demoScreenshot.jpg --------------------------------------------------------------------------------