├── LICENSE ├── Package.swift ├── README.md ├── STTextView ├── Podfile ├── STTextView.podspec ├── STTextView.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ ├── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcuserdata │ │ │ └── onl1ner.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── STTextView.xcscheme │ └── xcuserdata │ │ └── onl1ner.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist └── STTextView │ ├── Info.plist │ ├── STTextView.h │ └── STTextView.swift └── STTextViewExample ├── Podfile ├── Podfile.lock ├── Pods ├── Local Podspecs │ └── STTextView.podspec.json ├── Manifest.lock ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ └── onl1ner.xcuserdatad │ │ └── xcschemes │ │ ├── Pods-STTextViewExample.xcscheme │ │ ├── STTextView.xcscheme │ │ └── xcschememanagement.plist ├── STTextView │ ├── LICENSE │ ├── README.md │ └── STTextView │ │ └── STTextView │ │ └── STTextView.swift └── Target Support Files │ ├── Pods-STTextViewExample │ ├── Pods-STTextViewExample-Info.plist │ ├── Pods-STTextViewExample-acknowledgements.markdown │ ├── Pods-STTextViewExample-acknowledgements.plist │ ├── Pods-STTextViewExample-dummy.m │ ├── Pods-STTextViewExample-frameworks-Debug-input-files.xcfilelist │ ├── Pods-STTextViewExample-frameworks-Debug-output-files.xcfilelist │ ├── Pods-STTextViewExample-frameworks-Release-input-files.xcfilelist │ ├── Pods-STTextViewExample-frameworks-Release-output-files.xcfilelist │ ├── Pods-STTextViewExample-frameworks.sh │ ├── Pods-STTextViewExample-umbrella.h │ ├── Pods-STTextViewExample.debug.xcconfig │ ├── Pods-STTextViewExample.modulemap │ └── Pods-STTextViewExample.release.xcconfig │ └── STTextView │ ├── STTextView-Info.plist │ ├── STTextView-dummy.m │ ├── STTextView-prefix.pch │ ├── STTextView-umbrella.h │ ├── STTextView.debug.xcconfig │ ├── STTextView.modulemap │ ├── STTextView.release.xcconfig │ └── STTextView.xcconfig ├── STTextViewExample.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── onl1ner.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── onl1ner.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── STTextViewExample.xcworkspace ├── contents.xcworkspacedata ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── onl1ner.xcuserdatad │ └── UserInterfaceState.xcuserstate └── STTextViewExample ├── AppDelegate.swift ├── Assets.xcassets ├── AppIcon.appiconset │ ├── Contents.json │ ├── Icon-1024.png │ ├── Icon-20.png │ ├── Icon-20@2x.png │ ├── Icon-20@3x.png │ ├── Icon-29.png │ ├── Icon-29@2x.png │ ├── Icon-29@3x.png │ ├── Icon-40.png │ ├── Icon-40@2x.png │ ├── Icon-40@3x.png │ ├── Icon-60@2x.png │ ├── Icon-60@3x.png │ ├── Icon-76.png │ ├── Icon-76@2x.png │ └── Icon-83.5@2x.png └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist ├── SceneDelegate.swift └── TableViewController.swift /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tamerlan Satualdypov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:5.1 2 | import PackageDescription 3 | 4 | let package = Package( 5 | name: "STTextView", 6 | 7 | platforms: [.iOS(.v10)], 8 | 9 | products: [ .library(name: "STTextView", targets: ["STTextView"]) ], 10 | targets: [ .target(name: "STTextView", path: "STTextView/STTextView") ], 11 | 12 | swiftLanguageVersions: [.v5] 13 | ) 14 | 15 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |

STTextView

4 | 5 | ![](https://cocoapod-badges.herokuapp.com/p/STTextView/badge.png) 6 | ![](https://img.shields.io/badge/iOS-10.0%2B-blue) 7 | ![](https://cocoapod-badges.herokuapp.com/v/STTextView/badge.png) 8 | ![](https://cocoapod-badges.herokuapp.com/l/STTextView/badge.(png|svg)) 9 | ![](https://img.shields.io/badge/Swift-5-orange?logo=Swift&logoColor=white) 10 | ![](https://img.shields.io/github/last-commit/onl1ner/STTextView) 11 | 12 | **STTextView** – easy and clean library written in Swift. The framework adds a custom UITextView subclass with a needed ``placeholder`` property. 13 | 14 | 15 | ## Requirements 16 | - iOS 10.0 or above. 17 | 18 | Framework is compatible with Swift 5. 19 | 20 | ## Installation 21 | 22 | ``STTextView`` is available through [CocoaPods](https://cocoapods.org), [Carthage](https://github.com/Carthage/Carthage) and [Swift Package Manager](https://github.com/apple/swift-package-manager) 23 | 24 | ### CocoaPods 25 | - Add the following line into your Podfile: 26 | 27 | ```ruby 28 | pod 'STTextView' 29 | ``` 30 | 31 | - Then run this command in your terminal: 32 | 33 | ```bash 34 | $ pod install 35 | ``` 36 | 37 | ### Carthage 38 | - Add the following line into your Cartfile: 39 | 40 | ``` 41 | github "onl1ner/STTextView" 42 | ``` 43 | 44 | - And run the next command in terminal: 45 | 46 | ```bash 47 | $ carthage update 48 | ``` 49 | 50 | ### Swift Package Manager 51 | - In Xcode select: 52 | 53 | ``` 54 | File > Swift Packages > Add Package Dependency... 55 | ``` 56 | 57 | - Then paste this URL: 58 | 59 | ``` 60 | https://github.com/onl1ner/STTextView.git 61 | ``` 62 | 63 | ### Manually 64 | You could also install it manually. Just drag and drop the ``STTextView.swift`` file into your Xcode project. 65 | 66 | ## Usage 67 | 68 | ### Interface Builder 69 | 70 | Simply attach ``STTextView`` class to your UITextView object and you will be able to change the values through the Interface Builder. 71 | 72 |

73 | 74 |

75 | 76 | ### Swift 77 | 78 | ```swift 79 | import STTextView 80 | 81 | let textView = STTextView() 82 | textView.placeholder = "Some placeholder text" 83 | textView.placeholderColor = .secondaryLabel 84 | ``` 85 | 86 | You can also have an attributed placeholder. Use ``attributedPlaceholder`` property. 87 | 88 | ### Example 89 | Open example project ``STTextViewExample/STTextViewExample.xcworkspace`` to see a simple demonstrations of framework usage. 90 | 91 | ## Contributing 92 | Have some troubles? Feel free to open an issue. 93 | 94 | ## License 95 | **STTextView** is under the terms and conditions of the MIT license. 96 | 97 | ``` 98 | MIT License 99 | 100 | Copyright (c) 2020 Tamerlan Satualdypov 101 | 102 | Permission is hereby granted, free of charge, to any person obtaining a copy 103 | of this software and associated documentation files (the "Software"), to deal 104 | in the Software without restriction, including without limitation the rights 105 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 106 | copies of the Software, and to permit persons to whom the Software is 107 | furnished to do so, subject to the following conditions: 108 | 109 | The above copyright notice and this permission notice shall be included in all 110 | copies or substantial portions of the Software. 111 | 112 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 113 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 114 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 115 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 116 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 117 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 118 | SOFTWARE. 119 | ``` 120 | -------------------------------------------------------------------------------- /STTextView/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'STTextView' do 5 | # Comment the next line if you don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for STTextView 9 | 10 | end 11 | -------------------------------------------------------------------------------- /STTextView/STTextView.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |spec| 2 | spec.name = "STTextView" 3 | spec.version = "1.1.3" 4 | 5 | spec.summary = "STTextView is a light-weight framework that adds a placeholder to the UITextView." 6 | 7 | spec.homepage = "https://github.com/onl1ner/STTextView" 8 | spec.license = "MIT" 9 | spec.author = { "Tamerlan Satualdypov" => "tsatualdypov@gmail.com" } 10 | 11 | spec.platform = :ios, "10.0" 12 | spec.swift_version = "5.0" 13 | 14 | spec.source = { :git => "https://github.com/onl1ner/STTextView.git", :tag => spec.version } 15 | 16 | spec.source_files = "STTextView/**/*.swift" 17 | end 18 | -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 920B072524DD2C4800084AB5 /* STTextView.h in Headers */ = {isa = PBXBuildFile; fileRef = 920B072324DD2C4800084AB5 /* STTextView.h */; settings = {ATTRIBUTES = (Public, ); }; }; 11 | 920B072C24DD2C5200084AB5 /* STTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920B072B24DD2C5200084AB5 /* STTextView.swift */; }; 12 | /* End PBXBuildFile section */ 13 | 14 | /* Begin PBXFileReference section */ 15 | 920B072024DD2C4800084AB5 /* STTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = STTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 16 | 920B072324DD2C4800084AB5 /* STTextView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = STTextView.h; sourceTree = ""; }; 17 | 920B072424DD2C4800084AB5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 18 | 920B072B24DD2C5200084AB5 /* STTextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = STTextView.swift; sourceTree = ""; }; 19 | /* End PBXFileReference section */ 20 | 21 | /* Begin PBXFrameworksBuildPhase section */ 22 | 920B071D24DD2C4800084AB5 /* Frameworks */ = { 23 | isa = PBXFrameworksBuildPhase; 24 | buildActionMask = 2147483647; 25 | files = ( 26 | ); 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXFrameworksBuildPhase section */ 30 | 31 | /* Begin PBXGroup section */ 32 | 920B071624DD2C4800084AB5 = { 33 | isa = PBXGroup; 34 | children = ( 35 | 920B072224DD2C4800084AB5 /* STTextView */, 36 | 920B072124DD2C4800084AB5 /* Products */, 37 | ); 38 | sourceTree = ""; 39 | }; 40 | 920B072124DD2C4800084AB5 /* Products */ = { 41 | isa = PBXGroup; 42 | children = ( 43 | 920B072024DD2C4800084AB5 /* STTextView.framework */, 44 | ); 45 | name = Products; 46 | sourceTree = ""; 47 | }; 48 | 920B072224DD2C4800084AB5 /* STTextView */ = { 49 | isa = PBXGroup; 50 | children = ( 51 | 920B072324DD2C4800084AB5 /* STTextView.h */, 52 | 920B072424DD2C4800084AB5 /* Info.plist */, 53 | 920B072B24DD2C5200084AB5 /* STTextView.swift */, 54 | ); 55 | path = STTextView; 56 | sourceTree = ""; 57 | }; 58 | /* End PBXGroup section */ 59 | 60 | /* Begin PBXHeadersBuildPhase section */ 61 | 920B071B24DD2C4800084AB5 /* Headers */ = { 62 | isa = PBXHeadersBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 920B072524DD2C4800084AB5 /* STTextView.h in Headers */, 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | /* End PBXHeadersBuildPhase section */ 70 | 71 | /* Begin PBXNativeTarget section */ 72 | 920B071F24DD2C4800084AB5 /* STTextView */ = { 73 | isa = PBXNativeTarget; 74 | buildConfigurationList = 920B072824DD2C4800084AB5 /* Build configuration list for PBXNativeTarget "STTextView" */; 75 | buildPhases = ( 76 | 920B071B24DD2C4800084AB5 /* Headers */, 77 | 920B071C24DD2C4800084AB5 /* Sources */, 78 | 920B071D24DD2C4800084AB5 /* Frameworks */, 79 | 920B071E24DD2C4800084AB5 /* Resources */, 80 | ); 81 | buildRules = ( 82 | ); 83 | dependencies = ( 84 | ); 85 | name = STTextView; 86 | productName = STTextView; 87 | productReference = 920B072024DD2C4800084AB5 /* STTextView.framework */; 88 | productType = "com.apple.product-type.framework"; 89 | }; 90 | /* End PBXNativeTarget section */ 91 | 92 | /* Begin PBXProject section */ 93 | 920B071724DD2C4800084AB5 /* Project object */ = { 94 | isa = PBXProject; 95 | attributes = { 96 | LastUpgradeCheck = 1130; 97 | ORGANIZATIONNAME = "onl1ner onl1ner"; 98 | TargetAttributes = { 99 | 920B071F24DD2C4800084AB5 = { 100 | CreatedOnToolsVersion = 11.3.1; 101 | LastSwiftMigration = 1130; 102 | }; 103 | }; 104 | }; 105 | buildConfigurationList = 920B071A24DD2C4800084AB5 /* Build configuration list for PBXProject "STTextView" */; 106 | compatibilityVersion = "Xcode 9.3"; 107 | developmentRegion = en; 108 | hasScannedForEncodings = 0; 109 | knownRegions = ( 110 | en, 111 | Base, 112 | ); 113 | mainGroup = 920B071624DD2C4800084AB5; 114 | productRefGroup = 920B072124DD2C4800084AB5 /* Products */; 115 | projectDirPath = ""; 116 | projectRoot = ""; 117 | targets = ( 118 | 920B071F24DD2C4800084AB5 /* STTextView */, 119 | ); 120 | }; 121 | /* End PBXProject section */ 122 | 123 | /* Begin PBXResourcesBuildPhase section */ 124 | 920B071E24DD2C4800084AB5 /* Resources */ = { 125 | isa = PBXResourcesBuildPhase; 126 | buildActionMask = 2147483647; 127 | files = ( 128 | ); 129 | runOnlyForDeploymentPostprocessing = 0; 130 | }; 131 | /* End PBXResourcesBuildPhase section */ 132 | 133 | /* Begin PBXSourcesBuildPhase section */ 134 | 920B071C24DD2C4800084AB5 /* Sources */ = { 135 | isa = PBXSourcesBuildPhase; 136 | buildActionMask = 2147483647; 137 | files = ( 138 | 920B072C24DD2C5200084AB5 /* STTextView.swift in Sources */, 139 | ); 140 | runOnlyForDeploymentPostprocessing = 0; 141 | }; 142 | /* End PBXSourcesBuildPhase section */ 143 | 144 | /* Begin XCBuildConfiguration section */ 145 | 920B072624DD2C4800084AB5 /* Debug */ = { 146 | isa = XCBuildConfiguration; 147 | buildSettings = { 148 | ALWAYS_SEARCH_USER_PATHS = NO; 149 | CLANG_ANALYZER_NONNULL = YES; 150 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 151 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 152 | CLANG_CXX_LIBRARY = "libc++"; 153 | CLANG_ENABLE_MODULES = YES; 154 | CLANG_ENABLE_OBJC_ARC = YES; 155 | CLANG_ENABLE_OBJC_WEAK = YES; 156 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 157 | CLANG_WARN_BOOL_CONVERSION = YES; 158 | CLANG_WARN_COMMA = YES; 159 | CLANG_WARN_CONSTANT_CONVERSION = YES; 160 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 161 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 162 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 163 | CLANG_WARN_EMPTY_BODY = YES; 164 | CLANG_WARN_ENUM_CONVERSION = YES; 165 | CLANG_WARN_INFINITE_RECURSION = YES; 166 | CLANG_WARN_INT_CONVERSION = YES; 167 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 168 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 169 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 170 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 171 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 172 | CLANG_WARN_STRICT_PROTOTYPES = YES; 173 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 174 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 175 | CLANG_WARN_UNREACHABLE_CODE = YES; 176 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 177 | COPY_PHASE_STRIP = NO; 178 | CURRENT_PROJECT_VERSION = 1; 179 | DEBUG_INFORMATION_FORMAT = dwarf; 180 | ENABLE_STRICT_OBJC_MSGSEND = YES; 181 | ENABLE_TESTABILITY = YES; 182 | GCC_C_LANGUAGE_STANDARD = gnu11; 183 | GCC_DYNAMIC_NO_PIC = NO; 184 | GCC_NO_COMMON_BLOCKS = YES; 185 | GCC_OPTIMIZATION_LEVEL = 0; 186 | GCC_PREPROCESSOR_DEFINITIONS = ( 187 | "DEBUG=1", 188 | "$(inherited)", 189 | ); 190 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 191 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 192 | GCC_WARN_UNDECLARED_SELECTOR = YES; 193 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 194 | GCC_WARN_UNUSED_FUNCTION = YES; 195 | GCC_WARN_UNUSED_VARIABLE = YES; 196 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 197 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 198 | MTL_FAST_MATH = YES; 199 | ONLY_ACTIVE_ARCH = YES; 200 | SDKROOT = iphoneos; 201 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 202 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 203 | VERSIONING_SYSTEM = "apple-generic"; 204 | VERSION_INFO_PREFIX = ""; 205 | }; 206 | name = Debug; 207 | }; 208 | 920B072724DD2C4800084AB5 /* Release */ = { 209 | isa = XCBuildConfiguration; 210 | buildSettings = { 211 | ALWAYS_SEARCH_USER_PATHS = NO; 212 | CLANG_ANALYZER_NONNULL = YES; 213 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 214 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 215 | CLANG_CXX_LIBRARY = "libc++"; 216 | CLANG_ENABLE_MODULES = YES; 217 | CLANG_ENABLE_OBJC_ARC = YES; 218 | CLANG_ENABLE_OBJC_WEAK = YES; 219 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 220 | CLANG_WARN_BOOL_CONVERSION = YES; 221 | CLANG_WARN_COMMA = YES; 222 | CLANG_WARN_CONSTANT_CONVERSION = YES; 223 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 224 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 225 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 226 | CLANG_WARN_EMPTY_BODY = YES; 227 | CLANG_WARN_ENUM_CONVERSION = YES; 228 | CLANG_WARN_INFINITE_RECURSION = YES; 229 | CLANG_WARN_INT_CONVERSION = YES; 230 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 231 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 232 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 233 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 234 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 235 | CLANG_WARN_STRICT_PROTOTYPES = YES; 236 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 237 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 238 | CLANG_WARN_UNREACHABLE_CODE = YES; 239 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 240 | COPY_PHASE_STRIP = NO; 241 | CURRENT_PROJECT_VERSION = 1; 242 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 243 | ENABLE_NS_ASSERTIONS = NO; 244 | ENABLE_STRICT_OBJC_MSGSEND = YES; 245 | GCC_C_LANGUAGE_STANDARD = gnu11; 246 | GCC_NO_COMMON_BLOCKS = YES; 247 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 248 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 249 | GCC_WARN_UNDECLARED_SELECTOR = YES; 250 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 251 | GCC_WARN_UNUSED_FUNCTION = YES; 252 | GCC_WARN_UNUSED_VARIABLE = YES; 253 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 254 | MTL_ENABLE_DEBUG_INFO = NO; 255 | MTL_FAST_MATH = YES; 256 | SDKROOT = iphoneos; 257 | SWIFT_COMPILATION_MODE = wholemodule; 258 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 259 | VALIDATE_PRODUCT = YES; 260 | VERSIONING_SYSTEM = "apple-generic"; 261 | VERSION_INFO_PREFIX = ""; 262 | }; 263 | name = Release; 264 | }; 265 | 920B072924DD2C4800084AB5 /* Debug */ = { 266 | isa = XCBuildConfiguration; 267 | buildSettings = { 268 | CLANG_ENABLE_MODULES = YES; 269 | CODE_SIGN_STYLE = Automatic; 270 | DEFINES_MODULE = YES; 271 | DEVELOPMENT_TEAM = H72YUS24CN; 272 | DYLIB_COMPATIBILITY_VERSION = 1; 273 | DYLIB_CURRENT_VERSION = 1; 274 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 275 | INFOPLIST_FILE = STTextView/Info.plist; 276 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 277 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 278 | LD_RUNPATH_SEARCH_PATHS = ( 279 | "$(inherited)", 280 | "@executable_path/Frameworks", 281 | "@loader_path/Frameworks", 282 | ); 283 | PRODUCT_BUNDLE_IDENTIFIER = onl1ner.STTextView; 284 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 285 | SKIP_INSTALL = YES; 286 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 287 | SWIFT_VERSION = 5.0; 288 | TARGETED_DEVICE_FAMILY = "1,2"; 289 | }; 290 | name = Debug; 291 | }; 292 | 920B072A24DD2C4800084AB5 /* Release */ = { 293 | isa = XCBuildConfiguration; 294 | buildSettings = { 295 | CLANG_ENABLE_MODULES = YES; 296 | CODE_SIGN_STYLE = Automatic; 297 | DEFINES_MODULE = YES; 298 | DEVELOPMENT_TEAM = H72YUS24CN; 299 | DYLIB_COMPATIBILITY_VERSION = 1; 300 | DYLIB_CURRENT_VERSION = 1; 301 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 302 | INFOPLIST_FILE = STTextView/Info.plist; 303 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 304 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 305 | LD_RUNPATH_SEARCH_PATHS = ( 306 | "$(inherited)", 307 | "@executable_path/Frameworks", 308 | "@loader_path/Frameworks", 309 | ); 310 | PRODUCT_BUNDLE_IDENTIFIER = onl1ner.STTextView; 311 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 312 | SKIP_INSTALL = YES; 313 | SWIFT_VERSION = 5.0; 314 | TARGETED_DEVICE_FAMILY = "1,2"; 315 | }; 316 | name = Release; 317 | }; 318 | /* End XCBuildConfiguration section */ 319 | 320 | /* Begin XCConfigurationList section */ 321 | 920B071A24DD2C4800084AB5 /* Build configuration list for PBXProject "STTextView" */ = { 322 | isa = XCConfigurationList; 323 | buildConfigurations = ( 324 | 920B072624DD2C4800084AB5 /* Debug */, 325 | 920B072724DD2C4800084AB5 /* Release */, 326 | ); 327 | defaultConfigurationIsVisible = 0; 328 | defaultConfigurationName = Release; 329 | }; 330 | 920B072824DD2C4800084AB5 /* Build configuration list for PBXNativeTarget "STTextView" */ = { 331 | isa = XCConfigurationList; 332 | buildConfigurations = ( 333 | 920B072924DD2C4800084AB5 /* Debug */, 334 | 920B072A24DD2C4800084AB5 /* Release */, 335 | ); 336 | defaultConfigurationIsVisible = 0; 337 | defaultConfigurationName = Release; 338 | }; 339 | /* End XCConfigurationList section */ 340 | }; 341 | rootObject = 920B071724DD2C4800084AB5 /* Project object */; 342 | } 343 | -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/project.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextView/STTextView.xcodeproj/project.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/xcshareddata/xcschemes/STTextView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 57 | 58 | 59 | 60 | 62 | 63 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /STTextView/STTextView.xcodeproj/xcuserdata/onl1ner.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | STTextView.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /STTextView/STTextView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | 22 | 23 | -------------------------------------------------------------------------------- /STTextView/STTextView/STTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // STTextView.h 3 | // STTextView 4 | // 5 | // Created by onl1ner onl1ner on 07/08/2020. 6 | // Copyright © 2020 onl1ner onl1ner. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for STTextView. 12 | FOUNDATION_EXPORT double STTextViewVersionNumber; 13 | 14 | //! Project version string for STTextView. 15 | FOUNDATION_EXPORT const unsigned char STTextViewVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /STTextView/STTextView/STTextView.swift: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // 3 | // Copyright (c) 2020 Tamerlan Satualdypov 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | import UIKit 24 | 25 | @IBDesignable open class STTextView : UITextView { 26 | 27 | public enum PlaceholderVerticalAlignment : Int { 28 | /// Placeholder text will align as textView's text. 29 | case none 30 | 31 | /// Placeholder text will be centered horizontaly and verticaly. 32 | case center 33 | 34 | /// Placeholder text will be on the bottom of textView. 35 | case bottom 36 | } 37 | 38 | /// Placeholder string that will be shown in your TextView. 39 | @IBInspectable public var placeholder : String = "Enter your placeholder" { 40 | didSet { self.placeholderTextView.text = self.placeholder } 41 | } 42 | 43 | /// Color that would be applied to your placeholder text. 44 | @IBInspectable public var placeholderColor : UIColor = .gray { 45 | didSet { self.placeholderTextView.textColor = self.placeholderColor } 46 | } 47 | 48 | /// If true placeholder text will hide when user starts editing. 49 | @IBInspectable public var shouldHidePlaceholderOnEditing : Bool = false 50 | 51 | /// Attributed placeholder to show your attributed string. 52 | public var attributedPlaceholder : NSAttributedString? { 53 | didSet { 54 | if self.attributedPlaceholder != nil { 55 | self.placeholderTextView.text = nil 56 | self.placeholderTextView.attributedText = self.attributedPlaceholder 57 | } 58 | } 59 | } 60 | 61 | /// Placeholder text's vertical alignment. Please note that if you will use center or bottom alignment 62 | /// the `shouldHidePlaceholderOnEditing` property will be always true. 63 | public var placeholderVerticalAlignment : PlaceholderVerticalAlignment = .none { 64 | didSet { self.recalculatePlaceholderInset() } 65 | } 66 | 67 | // We have to check if text property is changing at runtime. 68 | public override var text: String! { 69 | didSet { self.placeholderTextView.isHidden = !self.text.isEmpty } 70 | } 71 | 72 | public override var textContainerInset: UIEdgeInsets { 73 | didSet { self.placeholderTextView.textContainerInset = self.textContainerInset } 74 | } 75 | 76 | public override var font: UIFont? { 77 | didSet { self.placeholderTextView.font = self.font } 78 | } 79 | 80 | lazy private var placeholderTextView : UITextView = { 81 | let textView = UITextView() 82 | 83 | textView.text = self.placeholder 84 | textView.textColor = self.placeholderColor 85 | 86 | textView.font = self.font 87 | 88 | textView.textAlignment = self.textAlignment 89 | textView.textContainerInset = self.textContainerInset 90 | 91 | textView.frame = self.bounds 92 | 93 | textView.backgroundColor = .clear 94 | 95 | textView.isUserInteractionEnabled = false 96 | textView.translatesAutoresizingMaskIntoConstraints = false 97 | 98 | textView.isHidden = !self.text.isEmpty 99 | 100 | return textView 101 | }() 102 | 103 | private var heightConstraint : NSLayoutConstraint? 104 | private var originHeightConstant : CGFloat? 105 | 106 | @objc private func textDidBeginEditing(_ notification : Notification) -> () { 107 | if self.text.isEmpty { 108 | if self.shouldHidePlaceholderOnEditing { 109 | self.placeholderTextView.isHidden = true 110 | } 111 | } 112 | 113 | self.updateContentSize() 114 | } 115 | 116 | @objc private func textDidChange(_ notification : Notification) -> () { 117 | if self.shouldHidePlaceholderOnEditing { 118 | if self.text.isEmpty { 119 | self.placeholderTextView.isHidden = true 120 | } 121 | } else { 122 | self.placeholderTextView.isHidden = !self.text.isEmpty 123 | } 124 | } 125 | 126 | @objc private func textDidEndEditing(_ notification : Notification) -> () { 127 | if self.text.isEmpty { 128 | if self.shouldHidePlaceholderOnEditing { 129 | self.placeholderTextView.isHidden = false 130 | } 131 | } 132 | 133 | self.updateContentSize() 134 | } 135 | 136 | // Method is used to update the placeholderTextView whenever 137 | // the UITextView changes in Interface Builder. 138 | private func updatePlaceholder() -> () { 139 | self.placeholderTextView.text = self.placeholder 140 | self.placeholderTextView.textColor = self.placeholderColor 141 | 142 | self.placeholderTextView.font = self.font 143 | self.placeholderTextView.textAlignment = self.textAlignment 144 | 145 | self.placeholderTextView.frame = self.bounds 146 | } 147 | 148 | // The content should be always visible 149 | // even if it's just a placeholder text. 150 | // This function is solving the problem when a placeholder text 151 | // did not fit in the UITextView if the height constraint's constant 152 | // is less than the placeholder text. 153 | private func updateContentSize() -> () { 154 | if self.text.isEmpty { 155 | if let constraint = self.heightConstraint, let originHeight = self.originHeightConstant { 156 | let placeholderContentHeight = self.placeholderTextView.contentSize.height 157 | 158 | if self.shouldHidePlaceholderOnEditing && self.isFirstResponder { 159 | if originHeight < placeholderContentHeight { 160 | constraint.constant = originHeight 161 | } 162 | } else { 163 | if constraint.constant < placeholderContentHeight { 164 | constraint.constant = placeholderContentHeight 165 | } 166 | } 167 | } 168 | } 169 | 170 | self.placeholderTextView.frame = self.bounds 171 | } 172 | 173 | private func applyCenterAlignment() -> () { 174 | // Inset for center alignment of a placeholderText will be: 175 | // ((textView's height) - (placeholder's content height) * (zoom)) / 2. 176 | let rootTextViewHeight = self.bounds.size.height 177 | let placeholderTextViewHeight = self.placeholderTextView.contentSize.height 178 | let placeholderTextViewZoom = self.placeholderTextView.zoomScale 179 | 180 | var inset = (rootTextViewHeight - (placeholderTextViewHeight * placeholderTextViewZoom)) / 2 181 | inset = inset < 0.0 ? 0.0 : inset 182 | 183 | self.placeholderTextView.contentInset.top = inset 184 | self.shouldHidePlaceholderOnEditing = true 185 | } 186 | 187 | private func applyBottomAlignment() -> () { 188 | // Inset for bottom alignment of a placeholderText will be: 189 | // (textView's height) - (placeholder's content height) * (zoom). 190 | let rootTextViewHeight = self.bounds.size.height 191 | let placeholderTextViewHeight = self.placeholderTextView.contentSize.height 192 | let placeholderTextViewZoom = self.placeholderTextView.zoomScale 193 | 194 | var inset = (rootTextViewHeight - (placeholderTextViewHeight * placeholderTextViewZoom)) 195 | inset = inset < 0.0 ? 0.0 : inset 196 | 197 | self.placeholderTextView.contentInset.top = inset 198 | self.shouldHidePlaceholderOnEditing = true 199 | } 200 | 201 | // Calculating the inset for a content 202 | // from the top to align the text 203 | // inside placeholderTextView. 204 | private func recalculatePlaceholderInset() -> () { 205 | switch placeholderVerticalAlignment { 206 | case .none: self.placeholderTextView.textContainerInset = self.textContainerInset 207 | case .center: self.applyCenterAlignment() 208 | case .bottom: self.applyBottomAlignment() 209 | } 210 | } 211 | 212 | private func signForNotifications() -> () { 213 | NotificationCenter.default.addObserver(self, selector: #selector(textDidChange(_:)), name: UITextView.textDidChangeNotification, object: self) 214 | NotificationCenter.default.addObserver(self, selector: #selector(textDidBeginEditing(_:)), name: UITextView.textDidBeginEditingNotification, object: self) 215 | NotificationCenter.default.addObserver(self, selector: #selector(textDidEndEditing(_:)), name: UITextView.textDidEndEditingNotification, object: self) 216 | } 217 | 218 | private func initialConfiguration() -> () { 219 | self.insertSubview(self.placeholderTextView, at: 0) 220 | self.signForNotifications() 221 | } 222 | 223 | public override func prepareForInterfaceBuilder() { 224 | super.prepareForInterfaceBuilder() 225 | self.updatePlaceholder() 226 | } 227 | 228 | public override func layoutSubviews() { 229 | super.layoutSubviews() 230 | 231 | // Getting an initial value of the height constraint's constant 232 | if self.heightConstraint == nil { 233 | for constraint in self.constraints { 234 | if constraint.firstAttribute == .height { 235 | self.heightConstraint = constraint 236 | self.originHeightConstant = constraint.constant 237 | break 238 | } 239 | } 240 | } 241 | 242 | self.updateContentSize() 243 | self.recalculatePlaceholderInset() 244 | } 245 | 246 | public override init(frame: CGRect, textContainer: NSTextContainer?) { 247 | // To avoid Interface Builder render and auto-layout issues 248 | super.init(frame: frame, textContainer: textContainer) 249 | self.initialConfiguration() 250 | } 251 | 252 | required public init?(coder : NSCoder) { 253 | super.init(coder: coder) 254 | self.initialConfiguration() 255 | } 256 | 257 | deinit { 258 | NotificationCenter.default.removeObserver(self, name: UITextView.textDidBeginEditingNotification, object: nil) 259 | NotificationCenter.default.removeObserver(self, name: UITextView.textDidChangeNotification, object: nil) 260 | NotificationCenter.default.removeObserver(self, name: UITextView.textDidEndEditingNotification, object: nil) 261 | } 262 | } 263 | -------------------------------------------------------------------------------- /STTextViewExample/Podfile: -------------------------------------------------------------------------------- 1 | target 'STTextViewExample' do 2 | use_frameworks! 3 | 4 | pod "STTextView", :path => '../STTextView/' 5 | end 6 | -------------------------------------------------------------------------------- /STTextViewExample/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - STTextView (1.1.3) 3 | 4 | DEPENDENCIES: 5 | - STTextView (from `../STTextView/`) 6 | 7 | EXTERNAL SOURCES: 8 | STTextView: 9 | :path: "../STTextView/" 10 | 11 | SPEC CHECKSUMS: 12 | STTextView: cb4d43949845294bd7d203f870bb50a426b65e36 13 | 14 | PODFILE CHECKSUM: ec6d35d4ae11ce3271fa2f1d49a4dcde13a2af17 15 | 16 | COCOAPODS: 1.9.3 17 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Local Podspecs/STTextView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "STTextView", 3 | "version": "1.1.3", 4 | "summary": "STTextView is a light-weight framework that adds a placeholder to the UITextView.", 5 | "homepage": "https://github.com/onl1ner/STTextView", 6 | "license": "MIT", 7 | "authors": { 8 | "Tamerlan Satualdypov": "tsatualdypov@gmail.com" 9 | }, 10 | "platforms": { 11 | "ios": "10.0" 12 | }, 13 | "swift_versions": "5.0", 14 | "source": { 15 | "git": "https://github.com/onl1ner/STTextView.git", 16 | "tag": "1.1.3" 17 | }, 18 | "source_files": "STTextView/**/*.swift", 19 | "swift_version": "5.0" 20 | } 21 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - STTextView (1.1.3) 3 | 4 | DEPENDENCIES: 5 | - STTextView (from `../STTextView/`) 6 | 7 | EXTERNAL SOURCES: 8 | STTextView: 9 | :path: "../STTextView/" 10 | 11 | SPEC CHECKSUMS: 12 | STTextView: cb4d43949845294bd7d203f870bb50a426b65e36 13 | 14 | PODFILE CHECKSUM: ec6d35d4ae11ce3271fa2f1d49a4dcde13a2af17 15 | 16 | COCOAPODS: 1.9.3 17 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 22E6E4EAE78638DA67995B81A7180136 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 11 | 49DBA904D37782DA83AEBE26B3418076 /* STTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD4C0DC8CD9E2F2808F7DDCEFDFED8D0 /* STTextView.swift */; }; 12 | 68FAE0CF6ACDA4AAB4087AD06008A966 /* Pods-STTextViewExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2B11E2D21C44BAF37F83D27E3D0BC985 /* Pods-STTextViewExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 7E1AFB69FC7D8DA993764A19A3F0A71D /* STTextView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 4573F2520187686731426B64B94ECD9D /* STTextView-dummy.m */; }; 14 | 8790A23FBADD7A33557125CC3AE907DA /* STTextView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3FFADFB7E9DE679E4F4E95C719E67FB5 /* STTextView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | B785E4876B97C7E747D6BF13A17299CC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */; }; 16 | F99A4159A492C18763E570341E6F7EC2 /* Pods-STTextViewExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C99B845540FD2D00638F7123EE142F3E /* Pods-STTextViewExample-dummy.m */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXContainerItemProxy section */ 20 | CBAF1A2CEB00B634A4861408C14A2365 /* PBXContainerItemProxy */ = { 21 | isa = PBXContainerItemProxy; 22 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; 23 | proxyType = 1; 24 | remoteGlobalIDString = 8F56772FEBA0C4DC86461BFCD66DAA0F; 25 | remoteInfo = STTextView; 26 | }; 27 | /* End PBXContainerItemProxy section */ 28 | 29 | /* Begin PBXFileReference section */ 30 | 0044BA31FA7C319828407BE1133CCD70 /* Pods-STTextViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-STTextViewExample.debug.xcconfig"; sourceTree = ""; }; 31 | 122C93A2249EB0398471ED3B7A8FB055 /* Pods-STTextViewExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-STTextViewExample-acknowledgements.markdown"; sourceTree = ""; }; 32 | 2AB7D798EAB25E9665C8E0E4A664DD54 /* STTextView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "STTextView-prefix.pch"; sourceTree = ""; }; 33 | 2B11E2D21C44BAF37F83D27E3D0BC985 /* Pods-STTextViewExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-STTextViewExample-umbrella.h"; sourceTree = ""; }; 34 | 31E2A911F731229A82791143A7E65DE3 /* STTextView.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = STTextView.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 35 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS12.2.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 36 | 3FFADFB7E9DE679E4F4E95C719E67FB5 /* STTextView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "STTextView-umbrella.h"; sourceTree = ""; }; 37 | 4329C5CECC951568F63F119380D341A3 /* STTextView.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = STTextView.release.xcconfig; sourceTree = ""; }; 38 | 4573F2520187686731426B64B94ECD9D /* STTextView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "STTextView-dummy.m"; sourceTree = ""; }; 39 | 781CD709E780926C92B24E7DAC676956 /* Pods-STTextViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-STTextViewExample.release.xcconfig"; sourceTree = ""; }; 40 | 805FD82C59D1C4B51FA513235395909D /* Pods-STTextViewExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-STTextViewExample.modulemap"; sourceTree = ""; }; 41 | 94322A8DF005F2BDBA915E8CDF4A7035 /* STTextView-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "STTextView-Info.plist"; sourceTree = ""; }; 42 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 43 | 9FAD6E960B7889BE061E9B022A271104 /* Pods-STTextViewExample-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-STTextViewExample-Info.plist"; sourceTree = ""; }; 44 | A8021F8D35B38D6D654E546C272652A4 /* STTextView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = STTextView.framework; path = STTextView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | B5364520F40C33146A979D4B889D9A81 /* Pods-STTextViewExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-STTextViewExample-frameworks.sh"; sourceTree = ""; }; 46 | C99B845540FD2D00638F7123EE142F3E /* Pods-STTextViewExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-STTextViewExample-dummy.m"; sourceTree = ""; }; 47 | CD4C0DC8CD9E2F2808F7DDCEFDFED8D0 /* STTextView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = STTextView.swift; path = STTextView/STTextView.swift; sourceTree = ""; }; 48 | E3C2ADC1BED07DF3B27357ABD73AF01D /* Pods-STTextViewExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-STTextViewExample-acknowledgements.plist"; sourceTree = ""; }; 49 | F027A8D96B8FE42839E094695772B2A5 /* Pods_STTextViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_STTextViewExample.framework; path = "Pods-STTextViewExample.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | F344170C03E39104F8F3BC7410320AB0 /* STTextView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = STTextView.modulemap; sourceTree = ""; }; 51 | F6BD41656C99B86AA51E18F8A0DE2C4D /* STTextView.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = STTextView.debug.xcconfig; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 0AFDD1182F059DCBEC0112EF15357A5E /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 22E6E4EAE78638DA67995B81A7180136 /* Foundation.framework in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | 536935EEB9BCD813113EEB4DC8B97EDC /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | B785E4876B97C7E747D6BF13A17299CC /* Foundation.framework in Frameworks */, 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | /* End PBXFrameworksBuildPhase section */ 72 | 73 | /* Begin PBXGroup section */ 74 | 3996CE37A7DBA1F23410F11919F91BDC /* Pods-STTextViewExample */ = { 75 | isa = PBXGroup; 76 | children = ( 77 | 805FD82C59D1C4B51FA513235395909D /* Pods-STTextViewExample.modulemap */, 78 | 122C93A2249EB0398471ED3B7A8FB055 /* Pods-STTextViewExample-acknowledgements.markdown */, 79 | E3C2ADC1BED07DF3B27357ABD73AF01D /* Pods-STTextViewExample-acknowledgements.plist */, 80 | C99B845540FD2D00638F7123EE142F3E /* Pods-STTextViewExample-dummy.m */, 81 | B5364520F40C33146A979D4B889D9A81 /* Pods-STTextViewExample-frameworks.sh */, 82 | 9FAD6E960B7889BE061E9B022A271104 /* Pods-STTextViewExample-Info.plist */, 83 | 2B11E2D21C44BAF37F83D27E3D0BC985 /* Pods-STTextViewExample-umbrella.h */, 84 | 0044BA31FA7C319828407BE1133CCD70 /* Pods-STTextViewExample.debug.xcconfig */, 85 | 781CD709E780926C92B24E7DAC676956 /* Pods-STTextViewExample.release.xcconfig */, 86 | ); 87 | name = "Pods-STTextViewExample"; 88 | path = "Target Support Files/Pods-STTextViewExample"; 89 | sourceTree = ""; 90 | }; 91 | 5AF87245F412FD3A1869A6D1E5AB97B7 /* STTextView */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | CD4C0DC8CD9E2F2808F7DDCEFDFED8D0 /* STTextView.swift */, 95 | F0539DC66ED5E4CE6786CAAF9AC0D9C4 /* Pod */, 96 | 825F2BFF0D7D8609AF6FE8518B2C1C17 /* Support Files */, 97 | ); 98 | name = STTextView; 99 | path = ../../STTextView; 100 | sourceTree = ""; 101 | }; 102 | 825F2BFF0D7D8609AF6FE8518B2C1C17 /* Support Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | F344170C03E39104F8F3BC7410320AB0 /* STTextView.modulemap */, 106 | 4573F2520187686731426B64B94ECD9D /* STTextView-dummy.m */, 107 | 94322A8DF005F2BDBA915E8CDF4A7035 /* STTextView-Info.plist */, 108 | 2AB7D798EAB25E9665C8E0E4A664DD54 /* STTextView-prefix.pch */, 109 | 3FFADFB7E9DE679E4F4E95C719E67FB5 /* STTextView-umbrella.h */, 110 | F6BD41656C99B86AA51E18F8A0DE2C4D /* STTextView.debug.xcconfig */, 111 | 4329C5CECC951568F63F119380D341A3 /* STTextView.release.xcconfig */, 112 | ); 113 | name = "Support Files"; 114 | path = "../STTextViewExample/Pods/Target Support Files/STTextView"; 115 | sourceTree = ""; 116 | }; 117 | B30C0EFAEABBE87A2AC727B4E9DF851E /* Development Pods */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 5AF87245F412FD3A1869A6D1E5AB97B7 /* STTextView */, 121 | ); 122 | name = "Development Pods"; 123 | sourceTree = ""; 124 | }; 125 | C0834CEBB1379A84116EF29F93051C60 /* iOS */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 3212113385A8FBBDB272BD23C409FF61 /* Foundation.framework */, 129 | ); 130 | name = iOS; 131 | sourceTree = ""; 132 | }; 133 | CF1408CF629C7361332E53B88F7BD30C = { 134 | isa = PBXGroup; 135 | children = ( 136 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 137 | B30C0EFAEABBE87A2AC727B4E9DF851E /* Development Pods */, 138 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, 139 | E75F0FAB97C1AFBB05BD69E73ED9431C /* Products */, 140 | FA6EA902ED78F8131933D2B6E62658E2 /* Targets Support Files */, 141 | ); 142 | sourceTree = ""; 143 | }; 144 | D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | C0834CEBB1379A84116EF29F93051C60 /* iOS */, 148 | ); 149 | name = Frameworks; 150 | sourceTree = ""; 151 | }; 152 | E75F0FAB97C1AFBB05BD69E73ED9431C /* Products */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | F027A8D96B8FE42839E094695772B2A5 /* Pods_STTextViewExample.framework */, 156 | A8021F8D35B38D6D654E546C272652A4 /* STTextView.framework */, 157 | ); 158 | name = Products; 159 | sourceTree = ""; 160 | }; 161 | F0539DC66ED5E4CE6786CAAF9AC0D9C4 /* Pod */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 31E2A911F731229A82791143A7E65DE3 /* STTextView.podspec */, 165 | ); 166 | name = Pod; 167 | sourceTree = ""; 168 | }; 169 | FA6EA902ED78F8131933D2B6E62658E2 /* Targets Support Files */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | 3996CE37A7DBA1F23410F11919F91BDC /* Pods-STTextViewExample */, 173 | ); 174 | name = "Targets Support Files"; 175 | sourceTree = ""; 176 | }; 177 | /* End PBXGroup section */ 178 | 179 | /* Begin PBXHeadersBuildPhase section */ 180 | 3FC7CB7C7D641CA250BDE6F469C96CB3 /* Headers */ = { 181 | isa = PBXHeadersBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | 8790A23FBADD7A33557125CC3AE907DA /* STTextView-umbrella.h in Headers */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | 8823C96C58646BE5B9DA0A9A95C2BE53 /* Headers */ = { 189 | isa = PBXHeadersBuildPhase; 190 | buildActionMask = 2147483647; 191 | files = ( 192 | 68FAE0CF6ACDA4AAB4087AD06008A966 /* Pods-STTextViewExample-umbrella.h in Headers */, 193 | ); 194 | runOnlyForDeploymentPostprocessing = 0; 195 | }; 196 | /* End PBXHeadersBuildPhase section */ 197 | 198 | /* Begin PBXNativeTarget section */ 199 | 0C5F4F12F0A7453006273AE8C71E3DB0 /* Pods-STTextViewExample */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 37B7D880494DC4D75D284B2C93A7F15D /* Build configuration list for PBXNativeTarget "Pods-STTextViewExample" */; 202 | buildPhases = ( 203 | 8823C96C58646BE5B9DA0A9A95C2BE53 /* Headers */, 204 | 4CB03506FC48E9A952CBE867292FEC6D /* Sources */, 205 | 536935EEB9BCD813113EEB4DC8B97EDC /* Frameworks */, 206 | 37381F1E2AA50C209B70AD0735EAD7CE /* Resources */, 207 | ); 208 | buildRules = ( 209 | ); 210 | dependencies = ( 211 | 05DE25092A248B2B02F4205C1A39DF79 /* PBXTargetDependency */, 212 | ); 213 | name = "Pods-STTextViewExample"; 214 | productName = "Pods-STTextViewExample"; 215 | productReference = F027A8D96B8FE42839E094695772B2A5 /* Pods_STTextViewExample.framework */; 216 | productType = "com.apple.product-type.framework"; 217 | }; 218 | 8F56772FEBA0C4DC86461BFCD66DAA0F /* STTextView */ = { 219 | isa = PBXNativeTarget; 220 | buildConfigurationList = E34BE746F6A2D8DDE9907FF7790ADA0F /* Build configuration list for PBXNativeTarget "STTextView" */; 221 | buildPhases = ( 222 | 3FC7CB7C7D641CA250BDE6F469C96CB3 /* Headers */, 223 | E1714B7593EAA242AAF3E67F8B3A2D76 /* Sources */, 224 | 0AFDD1182F059DCBEC0112EF15357A5E /* Frameworks */, 225 | 2753B55C6CB22704B724D0ABDB5F247E /* Resources */, 226 | ); 227 | buildRules = ( 228 | ); 229 | dependencies = ( 230 | ); 231 | name = STTextView; 232 | productName = STTextView; 233 | productReference = A8021F8D35B38D6D654E546C272652A4 /* STTextView.framework */; 234 | productType = "com.apple.product-type.framework"; 235 | }; 236 | /* End PBXNativeTarget section */ 237 | 238 | /* Begin PBXProject section */ 239 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = { 240 | isa = PBXProject; 241 | attributes = { 242 | LastSwiftUpdateCheck = 1100; 243 | LastUpgradeCheck = 1100; 244 | }; 245 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; 246 | compatibilityVersion = "Xcode 10.0"; 247 | developmentRegion = en; 248 | hasScannedForEncodings = 0; 249 | knownRegions = ( 250 | en, 251 | Base, 252 | ); 253 | mainGroup = CF1408CF629C7361332E53B88F7BD30C; 254 | productRefGroup = E75F0FAB97C1AFBB05BD69E73ED9431C /* Products */; 255 | projectDirPath = ""; 256 | projectRoot = ""; 257 | targets = ( 258 | 0C5F4F12F0A7453006273AE8C71E3DB0 /* Pods-STTextViewExample */, 259 | 8F56772FEBA0C4DC86461BFCD66DAA0F /* STTextView */, 260 | ); 261 | }; 262 | /* End PBXProject section */ 263 | 264 | /* Begin PBXResourcesBuildPhase section */ 265 | 2753B55C6CB22704B724D0ABDB5F247E /* Resources */ = { 266 | isa = PBXResourcesBuildPhase; 267 | buildActionMask = 2147483647; 268 | files = ( 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | }; 272 | 37381F1E2AA50C209B70AD0735EAD7CE /* Resources */ = { 273 | isa = PBXResourcesBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | runOnlyForDeploymentPostprocessing = 0; 278 | }; 279 | /* End PBXResourcesBuildPhase section */ 280 | 281 | /* Begin PBXSourcesBuildPhase section */ 282 | 4CB03506FC48E9A952CBE867292FEC6D /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | F99A4159A492C18763E570341E6F7EC2 /* Pods-STTextViewExample-dummy.m in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | E1714B7593EAA242AAF3E67F8B3A2D76 /* Sources */ = { 291 | isa = PBXSourcesBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | 7E1AFB69FC7D8DA993764A19A3F0A71D /* STTextView-dummy.m in Sources */, 295 | 49DBA904D37782DA83AEBE26B3418076 /* STTextView.swift in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | /* End PBXSourcesBuildPhase section */ 300 | 301 | /* Begin PBXTargetDependency section */ 302 | 05DE25092A248B2B02F4205C1A39DF79 /* PBXTargetDependency */ = { 303 | isa = PBXTargetDependency; 304 | name = STTextView; 305 | target = 8F56772FEBA0C4DC86461BFCD66DAA0F /* STTextView */; 306 | targetProxy = CBAF1A2CEB00B634A4861408C14A2365 /* PBXContainerItemProxy */; 307 | }; 308 | /* End PBXTargetDependency section */ 309 | 310 | /* Begin XCBuildConfiguration section */ 311 | 71F8786E3626B5BAA0B858E31C5A4BEB /* Debug */ = { 312 | isa = XCBuildConfiguration; 313 | baseConfigurationReference = 0044BA31FA7C319828407BE1133CCD70 /* Pods-STTextViewExample.debug.xcconfig */; 314 | buildSettings = { 315 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 316 | CLANG_ENABLE_OBJC_WEAK = NO; 317 | CODE_SIGN_IDENTITY = ""; 318 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 319 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 320 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 321 | CURRENT_PROJECT_VERSION = 1; 322 | DEFINES_MODULE = YES; 323 | DYLIB_COMPATIBILITY_VERSION = 1; 324 | DYLIB_CURRENT_VERSION = 1; 325 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 326 | INFOPLIST_FILE = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-Info.plist"; 327 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 328 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 329 | LD_RUNPATH_SEARCH_PATHS = ( 330 | "$(inherited)", 331 | "@executable_path/Frameworks", 332 | "@loader_path/Frameworks", 333 | ); 334 | MACH_O_TYPE = staticlib; 335 | MODULEMAP_FILE = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.modulemap"; 336 | OTHER_LDFLAGS = ""; 337 | OTHER_LIBTOOLFLAGS = ""; 338 | PODS_ROOT = "$(SRCROOT)"; 339 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 340 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 341 | SDKROOT = iphoneos; 342 | SKIP_INSTALL = YES; 343 | TARGETED_DEVICE_FAMILY = "1,2"; 344 | VERSIONING_SYSTEM = "apple-generic"; 345 | VERSION_INFO_PREFIX = ""; 346 | }; 347 | name = Debug; 348 | }; 349 | 939F1A8F6BCEB7F9F64D9EEE50CAE014 /* Debug */ = { 350 | isa = XCBuildConfiguration; 351 | buildSettings = { 352 | ALWAYS_SEARCH_USER_PATHS = NO; 353 | CLANG_ANALYZER_NONNULL = YES; 354 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 355 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 356 | CLANG_CXX_LIBRARY = "libc++"; 357 | CLANG_ENABLE_MODULES = YES; 358 | CLANG_ENABLE_OBJC_ARC = YES; 359 | CLANG_ENABLE_OBJC_WEAK = YES; 360 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 361 | CLANG_WARN_BOOL_CONVERSION = YES; 362 | CLANG_WARN_COMMA = YES; 363 | CLANG_WARN_CONSTANT_CONVERSION = YES; 364 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 365 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 366 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 367 | CLANG_WARN_EMPTY_BODY = YES; 368 | CLANG_WARN_ENUM_CONVERSION = YES; 369 | CLANG_WARN_INFINITE_RECURSION = YES; 370 | CLANG_WARN_INT_CONVERSION = YES; 371 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 372 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 373 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 374 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 375 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 376 | CLANG_WARN_STRICT_PROTOTYPES = YES; 377 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 378 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 379 | CLANG_WARN_UNREACHABLE_CODE = YES; 380 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 381 | COPY_PHASE_STRIP = NO; 382 | DEBUG_INFORMATION_FORMAT = dwarf; 383 | ENABLE_STRICT_OBJC_MSGSEND = YES; 384 | ENABLE_TESTABILITY = YES; 385 | GCC_C_LANGUAGE_STANDARD = gnu11; 386 | GCC_DYNAMIC_NO_PIC = NO; 387 | GCC_NO_COMMON_BLOCKS = YES; 388 | GCC_OPTIMIZATION_LEVEL = 0; 389 | GCC_PREPROCESSOR_DEFINITIONS = ( 390 | "POD_CONFIGURATION_DEBUG=1", 391 | "DEBUG=1", 392 | "$(inherited)", 393 | ); 394 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 395 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 396 | GCC_WARN_UNDECLARED_SELECTOR = YES; 397 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 398 | GCC_WARN_UNUSED_FUNCTION = YES; 399 | GCC_WARN_UNUSED_VARIABLE = YES; 400 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 401 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 402 | MTL_FAST_MATH = YES; 403 | ONLY_ACTIVE_ARCH = YES; 404 | PRODUCT_NAME = "$(TARGET_NAME)"; 405 | STRIP_INSTALLED_PRODUCT = NO; 406 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 407 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 408 | SWIFT_VERSION = 5.0; 409 | SYMROOT = "${SRCROOT}/../build"; 410 | }; 411 | name = Debug; 412 | }; 413 | AF42DC313E0F5106FB4F13B8557F849D /* Release */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 4329C5CECC951568F63F119380D341A3 /* STTextView.release.xcconfig */; 416 | buildSettings = { 417 | CLANG_ENABLE_OBJC_WEAK = NO; 418 | CODE_SIGN_IDENTITY = ""; 419 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 420 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 421 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 422 | CURRENT_PROJECT_VERSION = 1; 423 | DEFINES_MODULE = YES; 424 | DYLIB_COMPATIBILITY_VERSION = 1; 425 | DYLIB_CURRENT_VERSION = 1; 426 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 427 | GCC_PREFIX_HEADER = "Target Support Files/STTextView/STTextView-prefix.pch"; 428 | INFOPLIST_FILE = "Target Support Files/STTextView/STTextView-Info.plist"; 429 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 430 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 431 | LD_RUNPATH_SEARCH_PATHS = ( 432 | "$(inherited)", 433 | "@executable_path/Frameworks", 434 | "@loader_path/Frameworks", 435 | ); 436 | MODULEMAP_FILE = "Target Support Files/STTextView/STTextView.modulemap"; 437 | PRODUCT_MODULE_NAME = STTextView; 438 | PRODUCT_NAME = STTextView; 439 | SDKROOT = iphoneos; 440 | SKIP_INSTALL = YES; 441 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 442 | SWIFT_VERSION = 5.0; 443 | TARGETED_DEVICE_FAMILY = "1,2"; 444 | VALIDATE_PRODUCT = YES; 445 | VERSIONING_SYSTEM = "apple-generic"; 446 | VERSION_INFO_PREFIX = ""; 447 | }; 448 | name = Release; 449 | }; 450 | E5EACFA79CCFB6E55BF6605FF08AA1EE /* Debug */ = { 451 | isa = XCBuildConfiguration; 452 | baseConfigurationReference = F6BD41656C99B86AA51E18F8A0DE2C4D /* STTextView.debug.xcconfig */; 453 | buildSettings = { 454 | CLANG_ENABLE_OBJC_WEAK = NO; 455 | CODE_SIGN_IDENTITY = ""; 456 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 457 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 458 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 459 | CURRENT_PROJECT_VERSION = 1; 460 | DEFINES_MODULE = YES; 461 | DYLIB_COMPATIBILITY_VERSION = 1; 462 | DYLIB_CURRENT_VERSION = 1; 463 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 464 | GCC_PREFIX_HEADER = "Target Support Files/STTextView/STTextView-prefix.pch"; 465 | INFOPLIST_FILE = "Target Support Files/STTextView/STTextView-Info.plist"; 466 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 467 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 468 | LD_RUNPATH_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "@executable_path/Frameworks", 471 | "@loader_path/Frameworks", 472 | ); 473 | MODULEMAP_FILE = "Target Support Files/STTextView/STTextView.modulemap"; 474 | PRODUCT_MODULE_NAME = STTextView; 475 | PRODUCT_NAME = STTextView; 476 | SDKROOT = iphoneos; 477 | SKIP_INSTALL = YES; 478 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; 479 | SWIFT_VERSION = 5.0; 480 | TARGETED_DEVICE_FAMILY = "1,2"; 481 | VERSIONING_SYSTEM = "apple-generic"; 482 | VERSION_INFO_PREFIX = ""; 483 | }; 484 | name = Debug; 485 | }; 486 | ECB437504DF805BD96CAABF97400B526 /* Release */ = { 487 | isa = XCBuildConfiguration; 488 | buildSettings = { 489 | ALWAYS_SEARCH_USER_PATHS = NO; 490 | CLANG_ANALYZER_NONNULL = YES; 491 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 492 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 493 | CLANG_CXX_LIBRARY = "libc++"; 494 | CLANG_ENABLE_MODULES = YES; 495 | CLANG_ENABLE_OBJC_ARC = YES; 496 | CLANG_ENABLE_OBJC_WEAK = YES; 497 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 498 | CLANG_WARN_BOOL_CONVERSION = YES; 499 | CLANG_WARN_COMMA = YES; 500 | CLANG_WARN_CONSTANT_CONVERSION = YES; 501 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 502 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 503 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 504 | CLANG_WARN_EMPTY_BODY = YES; 505 | CLANG_WARN_ENUM_CONVERSION = YES; 506 | CLANG_WARN_INFINITE_RECURSION = YES; 507 | CLANG_WARN_INT_CONVERSION = YES; 508 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 509 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 510 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 511 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 512 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 513 | CLANG_WARN_STRICT_PROTOTYPES = YES; 514 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 515 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 516 | CLANG_WARN_UNREACHABLE_CODE = YES; 517 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 518 | COPY_PHASE_STRIP = NO; 519 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 520 | ENABLE_NS_ASSERTIONS = NO; 521 | ENABLE_STRICT_OBJC_MSGSEND = YES; 522 | GCC_C_LANGUAGE_STANDARD = gnu11; 523 | GCC_NO_COMMON_BLOCKS = YES; 524 | GCC_PREPROCESSOR_DEFINITIONS = ( 525 | "POD_CONFIGURATION_RELEASE=1", 526 | "$(inherited)", 527 | ); 528 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 529 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 530 | GCC_WARN_UNDECLARED_SELECTOR = YES; 531 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 532 | GCC_WARN_UNUSED_FUNCTION = YES; 533 | GCC_WARN_UNUSED_VARIABLE = YES; 534 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 535 | MTL_ENABLE_DEBUG_INFO = NO; 536 | MTL_FAST_MATH = YES; 537 | PRODUCT_NAME = "$(TARGET_NAME)"; 538 | STRIP_INSTALLED_PRODUCT = NO; 539 | SWIFT_COMPILATION_MODE = wholemodule; 540 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 541 | SWIFT_VERSION = 5.0; 542 | SYMROOT = "${SRCROOT}/../build"; 543 | }; 544 | name = Release; 545 | }; 546 | F43E457A945D791C6C3504A40D581C6F /* Release */ = { 547 | isa = XCBuildConfiguration; 548 | baseConfigurationReference = 781CD709E780926C92B24E7DAC676956 /* Pods-STTextViewExample.release.xcconfig */; 549 | buildSettings = { 550 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; 551 | CLANG_ENABLE_OBJC_WEAK = NO; 552 | CODE_SIGN_IDENTITY = ""; 553 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 554 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 555 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 556 | CURRENT_PROJECT_VERSION = 1; 557 | DEFINES_MODULE = YES; 558 | DYLIB_COMPATIBILITY_VERSION = 1; 559 | DYLIB_CURRENT_VERSION = 1; 560 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 561 | INFOPLIST_FILE = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-Info.plist"; 562 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 563 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 564 | LD_RUNPATH_SEARCH_PATHS = ( 565 | "$(inherited)", 566 | "@executable_path/Frameworks", 567 | "@loader_path/Frameworks", 568 | ); 569 | MACH_O_TYPE = staticlib; 570 | MODULEMAP_FILE = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.modulemap"; 571 | OTHER_LDFLAGS = ""; 572 | OTHER_LIBTOOLFLAGS = ""; 573 | PODS_ROOT = "$(SRCROOT)"; 574 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 575 | PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; 576 | SDKROOT = iphoneos; 577 | SKIP_INSTALL = YES; 578 | TARGETED_DEVICE_FAMILY = "1,2"; 579 | VALIDATE_PRODUCT = YES; 580 | VERSIONING_SYSTEM = "apple-generic"; 581 | VERSION_INFO_PREFIX = ""; 582 | }; 583 | name = Release; 584 | }; 585 | /* End XCBuildConfiguration section */ 586 | 587 | /* Begin XCConfigurationList section */ 588 | 37B7D880494DC4D75D284B2C93A7F15D /* Build configuration list for PBXNativeTarget "Pods-STTextViewExample" */ = { 589 | isa = XCConfigurationList; 590 | buildConfigurations = ( 591 | 71F8786E3626B5BAA0B858E31C5A4BEB /* Debug */, 592 | F43E457A945D791C6C3504A40D581C6F /* Release */, 593 | ); 594 | defaultConfigurationIsVisible = 0; 595 | defaultConfigurationName = Release; 596 | }; 597 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { 598 | isa = XCConfigurationList; 599 | buildConfigurations = ( 600 | 939F1A8F6BCEB7F9F64D9EEE50CAE014 /* Debug */, 601 | ECB437504DF805BD96CAABF97400B526 /* Release */, 602 | ); 603 | defaultConfigurationIsVisible = 0; 604 | defaultConfigurationName = Release; 605 | }; 606 | E34BE746F6A2D8DDE9907FF7790ADA0F /* Build configuration list for PBXNativeTarget "STTextView" */ = { 607 | isa = XCConfigurationList; 608 | buildConfigurations = ( 609 | E5EACFA79CCFB6E55BF6605FF08AA1EE /* Debug */, 610 | AF42DC313E0F5106FB4F13B8557F849D /* Release */, 611 | ); 612 | defaultConfigurationIsVisible = 0; 613 | defaultConfigurationName = Release; 614 | }; 615 | /* End XCConfigurationList section */ 616 | }; 617 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; 618 | } 619 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Pods.xcodeproj/xcuserdata/onl1ner.xcuserdatad/xcschemes/Pods-STTextViewExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 50 | 51 | 53 | 54 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Pods.xcodeproj/xcuserdata/onl1ner.xcuserdatad/xcschemes/STTextView.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 43 | 44 | 45 | 46 | 52 | 53 | 55 | 56 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Pods.xcodeproj/xcuserdata/onl1ner.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-STTextViewExample.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | STTextView.xcscheme 15 | 16 | isShown 17 | 18 | orderHint 19 | 1 20 | 21 | 22 | SuppressBuildableAutocreation 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/STTextView/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Tamerlan Satualdypov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/STTextView/README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 |

STTextView

4 | 5 | ![](https://cocoapod-badges.herokuapp.com/p/STTextView/badge.png) 6 | ![](https://img.shields.io/badge/iOS-10.0%2B-blue) 7 | ![](https://cocoapod-badges.herokuapp.com/v/STTextView/badge.png) 8 | ![](https://cocoapod-badges.herokuapp.com/l/STTextView/badge.(png|svg)) 9 | ![](https://img.shields.io/badge/Swift-5-orange?logo=Swift&logoColor=white) 10 | ![](https://img.shields.io/github/last-commit/onl1ner/STTextView) 11 | 12 | **STTextView** – easy and clean framework written in Swift. The framework adds a custom UITextView subclass with a needed ``placeholder`` property. 13 | 14 | 15 | ## Requirements 16 | - iOS 10.0 or above. 17 | 18 | Framework is compatible with Swift 5. 19 | 20 | ## Installation 21 | 22 | ``STTextView`` is available through [CocoaPods](https://cocoapods.org), [Carthage](https://github.com/Carthage/Carthage) and [Swift Package Manager](https://github.com/apple/swift-package-manager) 23 | 24 | ### CocoaPods 25 | - Add the following line into your Podfile: 26 | 27 | ```ruby 28 | pod 'STTextView' 29 | ``` 30 | 31 | - Then run this command in your terminal: 32 | 33 | ```bash 34 | $ pod install 35 | ``` 36 | 37 | ### Carthage 38 | - Add the following line into your Cartfile: 39 | 40 | ``` 41 | github "onl1ner/STTextView" 42 | ``` 43 | 44 | - And run the next command in terminal: 45 | 46 | ```bash 47 | $ carthage update 48 | ``` 49 | 50 | ### Swift Package Manager 51 | - In Xcode select: 52 | 53 | ``File > Swift Packages > Add Package Dependency...`` 54 | 55 | - Then paste this URL: 56 | 57 | ``https://github.com/onl1ner/STTextView.git`` 58 | 59 | ### Manually 60 | You could also install it manually. Just drag and drop the ``STTextView.swift`` file into your Xcode project. 61 | 62 | ## Usage 63 | 64 | ### Interface Builder 65 | 66 | Simply attach ``STTextView`` class to your UITextView object and you will be able to change the values through the Interface Builder. 67 | 68 | ### Swift 69 | 70 | ```swift 71 | import STTextView 72 | 73 | let textView = STTextView() 74 | textView.placeholder = "Some placeholder text" 75 | textView.placeholderColor = .secondaryLabel 76 | ``` 77 | 78 | You can also have an attributed placeholder. Use ``attributedPlaceholder`` property. 79 | 80 | ### Example 81 | Open example project ``STTextViewExample/STTextViewExample.xcworkspace`` to see a simple demonstrations of framework usage. 82 | 83 | ## Contributing 84 | Have some troubles? Feel free to open an issue. 85 | 86 | ## License 87 | **STTextView** is under the terms and conditions of the MIT license. 88 | 89 | ``` 90 | MIT License 91 | 92 | Copyright (c) 2020 Tamerlan Satualdypov 93 | 94 | Permission is hereby granted, free of charge, to any person obtaining a copy 95 | of this software and associated documentation files (the "Software"), to deal 96 | in the Software without restriction, including without limitation the rights 97 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 98 | copies of the Software, and to permit persons to whom the Software is 99 | furnished to do so, subject to the following conditions: 100 | 101 | The above copyright notice and this permission notice shall be included in all 102 | copies or substantial portions of the Software. 103 | 104 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 105 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 106 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 107 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 108 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 109 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 110 | SOFTWARE. 111 | ``` 112 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/STTextView/STTextView/STTextView/STTextView.swift: -------------------------------------------------------------------------------- 1 | // MIT License 2 | // 3 | // Copyright (c) 2020 Tamerlan Satualdypov 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in all 13 | // copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | // SOFTWARE. 22 | 23 | import UIKit 24 | 25 | @IBDesignable open class STTextView : UITextView { 26 | 27 | /// Placeholder string that will be shown in your TextView. 28 | @IBInspectable public var placeholder : String = "Enter your placeholder" { 29 | didSet { 30 | self.placeholderTextView.text = placeholder 31 | } 32 | } 33 | 34 | /// Color that would be applied to your placeholder text. 35 | @IBInspectable public var placeholderColor : UIColor = .gray { 36 | didSet { 37 | self.placeholderTextView.textColor = placeholderColor 38 | } 39 | } 40 | 41 | /// If true placeholder text will hide when user starts editing. 42 | @IBInspectable public var shouldHidePlaceholderOnEditing : Bool = false 43 | 44 | /// Attributed placeholder to show your attributed string. 45 | public var attributedPlaceholder : NSAttributedString? { 46 | didSet { 47 | if attributedPlaceholder != nil { 48 | self.placeholderTextView.text = nil 49 | self.placeholderTextView.attributedText = attributedPlaceholder 50 | } 51 | } 52 | } 53 | 54 | // We have to check if text property is changing at runtime. 55 | public override var text: String! { 56 | didSet { 57 | self.placeholderTextView.isHidden = !self.text.isEmpty 58 | } 59 | } 60 | 61 | public override var contentInset: UIEdgeInsets { 62 | didSet { 63 | self.placeholderTextView.contentInset = self.contentInset 64 | } 65 | } 66 | 67 | lazy private var placeholderTextView : UITextView = { 68 | let textView = UITextView() 69 | 70 | textView.text = self.placeholder 71 | textView.textColor = self.placeholderColor 72 | 73 | textView.font = self.font 74 | 75 | textView.textAlignment = self.textAlignment 76 | textView.contentInset = self.contentInset 77 | 78 | textView.frame = self.bounds 79 | 80 | textView.backgroundColor = .clear 81 | 82 | textView.isUserInteractionEnabled = false 83 | textView.translatesAutoresizingMaskIntoConstraints = false 84 | 85 | return textView 86 | }() 87 | 88 | @objc private func textDidBeginEditing() -> () { 89 | if self.text.isEmpty { 90 | if shouldHidePlaceholderOnEditing { 91 | placeholderTextView.isHidden = true 92 | } 93 | } 94 | } 95 | 96 | @objc private func textDidChange() -> () { 97 | placeholderTextView.isHidden = !self.text.isEmpty 98 | } 99 | 100 | @objc private func textDidEndEditing() -> () { 101 | if self.text.isEmpty { 102 | if shouldHidePlaceholderOnEditing { 103 | placeholderTextView.isHidden = false 104 | } 105 | } 106 | } 107 | 108 | // Method is used to update the placeholderTextView whenever 109 | // the TextView changes in Interface Builder. 110 | private func updatePlaceholder() -> () { 111 | placeholderTextView.text = placeholder 112 | placeholderTextView.textColor = placeholderColor 113 | 114 | placeholderTextView.font = self.font 115 | placeholderTextView.textAlignment = self.textAlignment 116 | } 117 | 118 | private func signForNotifications() -> () { 119 | NotificationCenter.default.addObserver(self, selector: #selector(textDidChange), name: UITextView.textDidChangeNotification, object: nil) 120 | NotificationCenter.default.addObserver(self, selector: #selector(textDidBeginEditing), name: UITextView.textDidBeginEditingNotification, object: nil) 121 | NotificationCenter.default.addObserver(self, selector: #selector(textDidEndEditing), name: UITextView.textDidEndEditingNotification, object: nil) 122 | } 123 | 124 | private func initialConfiguration() -> () { 125 | self.insertSubview(placeholderTextView, at: 0) 126 | 127 | signForNotifications() 128 | } 129 | 130 | public override func prepareForInterfaceBuilder() { 131 | super.prepareForInterfaceBuilder() 132 | 133 | updatePlaceholder() 134 | } 135 | 136 | public override func layoutSubviews() { 137 | super.layoutSubviews() 138 | 139 | placeholderTextView.frame = self.bounds 140 | } 141 | 142 | public override init(frame: CGRect, textContainer: NSTextContainer?) { 143 | // To avoid Interface Builder render and auto-layout issues 144 | super.init(frame: frame, textContainer: textContainer) 145 | 146 | initialConfiguration() 147 | } 148 | 149 | required public init?(coder aDecoder: NSCoder) { 150 | super.init(coder: aDecoder) 151 | 152 | initialConfiguration() 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | Generated by CocoaPods - https://cocoapods.org 4 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Generated by CocoaPods - https://cocoapods.org 18 | Title 19 | 20 | Type 21 | PSGroupSpecifier 22 | 23 | 24 | StringsTable 25 | Acknowledgements 26 | Title 27 | Acknowledgements 28 | 29 | 30 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_STTextViewExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_STTextViewExample 5 | @end 6 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-Debug-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/STTextView/STTextView.framework -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-Debug-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/STTextView.framework -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-Release-input-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${PODS_ROOT}/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks.sh 2 | ${BUILT_PRODUCTS_DIR}/STTextView/STTextView.framework -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-Release-output-files.xcfilelist: -------------------------------------------------------------------------------- 1 | ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/STTextView.framework -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | set -u 4 | set -o pipefail 5 | 6 | function on_error { 7 | echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" 8 | } 9 | trap 'on_error $LINENO' ERR 10 | 11 | if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then 12 | # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy 13 | # frameworks to, so exit 0 (signalling the script phase was successful). 14 | exit 0 15 | fi 16 | 17 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 19 | 20 | COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" 21 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 22 | 23 | # Used as a return value for each invocation of `strip_invalid_archs` function. 24 | STRIP_BINARY_RETVAL=0 25 | 26 | # This protects against multiple targets copying the same framework dependency at the same time. The solution 27 | # was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html 28 | RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") 29 | 30 | # Copies and strips a vendored framework 31 | install_framework() 32 | { 33 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 34 | local source="${BUILT_PRODUCTS_DIR}/$1" 35 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 36 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 37 | elif [ -r "$1" ]; then 38 | local source="$1" 39 | fi 40 | 41 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 42 | 43 | if [ -L "${source}" ]; then 44 | echo "Symlinked..." 45 | source="$(readlink "${source}")" 46 | fi 47 | 48 | # Use filter instead of exclude so missing patterns don't throw errors. 49 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 50 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 51 | 52 | local basename 53 | basename="$(basename -s .framework "$1")" 54 | binary="${destination}/${basename}.framework/${basename}" 55 | 56 | if ! [ -r "$binary" ]; then 57 | binary="${destination}/${basename}" 58 | elif [ -L "${binary}" ]; then 59 | echo "Destination binary is symlinked..." 60 | dirname="$(dirname "${binary}")" 61 | binary="${dirname}/$(readlink "${binary}")" 62 | fi 63 | 64 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 65 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 66 | strip_invalid_archs "$binary" 67 | fi 68 | 69 | # Resign the code if required by the build settings to avoid unstable apps 70 | code_sign_if_enabled "${destination}/$(basename "$1")" 71 | 72 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 73 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 74 | local swift_runtime_libs 75 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) 76 | for lib in $swift_runtime_libs; do 77 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 78 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 79 | code_sign_if_enabled "${destination}/${lib}" 80 | done 81 | fi 82 | } 83 | 84 | # Copies and strips a vendored dSYM 85 | install_dsym() { 86 | local source="$1" 87 | warn_missing_arch=${2:-true} 88 | if [ -r "$source" ]; then 89 | # Copy the dSYM into the targets temp dir. 90 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" 91 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" 92 | 93 | local basename 94 | basename="$(basename -s .dSYM "$source")" 95 | binary_name="$(ls "$source/Contents/Resources/DWARF")" 96 | binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" 97 | 98 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 99 | if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then 100 | strip_invalid_archs "$binary" "$warn_missing_arch" 101 | fi 102 | 103 | if [[ $STRIP_BINARY_RETVAL == 1 ]]; then 104 | # Move the stripped file into its final destination. 105 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" 106 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" 107 | else 108 | # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. 109 | touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" 110 | fi 111 | fi 112 | } 113 | 114 | # Copies the bcsymbolmap files of a vendored framework 115 | install_bcsymbolmap() { 116 | local bcsymbolmap_path="$1" 117 | local destination="${BUILT_PRODUCTS_DIR}" 118 | echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" 119 | rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" 120 | } 121 | 122 | # Signs a framework with the provided identity 123 | code_sign_if_enabled() { 124 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 125 | # Use the current code_sign_identity 126 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 127 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" 128 | 129 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 130 | code_sign_cmd="$code_sign_cmd &" 131 | fi 132 | echo "$code_sign_cmd" 133 | eval "$code_sign_cmd" 134 | fi 135 | } 136 | 137 | # Strip invalid architectures 138 | strip_invalid_archs() { 139 | binary="$1" 140 | warn_missing_arch=${2:-true} 141 | # Get architectures for current target binary 142 | binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" 143 | # Intersect them with the architectures we are building for 144 | intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" 145 | # If there are no archs supported by this binary then warn the user 146 | if [[ -z "$intersected_archs" ]]; then 147 | if [[ "$warn_missing_arch" == "true" ]]; then 148 | echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." 149 | fi 150 | STRIP_BINARY_RETVAL=0 151 | return 152 | fi 153 | stripped="" 154 | for arch in $binary_archs; do 155 | if ! [[ "${ARCHS}" == *"$arch"* ]]; then 156 | # Strip non-valid architectures in-place 157 | lipo -remove "$arch" -output "$binary" "$binary" 158 | stripped="$stripped $arch" 159 | fi 160 | done 161 | if [[ "$stripped" ]]; then 162 | echo "Stripped $binary of architectures:$stripped" 163 | fi 164 | STRIP_BINARY_RETVAL=1 165 | } 166 | 167 | install_artifact() { 168 | artifact="$1" 169 | base="$(basename "$artifact")" 170 | case $base in 171 | *.framework) 172 | install_framework "$artifact" 173 | ;; 174 | *.dSYM) 175 | # Suppress arch warnings since XCFrameworks will include many dSYM files 176 | install_dsym "$artifact" "false" 177 | ;; 178 | *.bcsymbolmap) 179 | install_bcsymbolmap "$artifact" 180 | ;; 181 | *) 182 | echo "error: Unrecognized artifact "$artifact"" 183 | ;; 184 | esac 185 | } 186 | 187 | copy_artifacts() { 188 | file_list="$1" 189 | while read artifact; do 190 | install_artifact "$artifact" 191 | done <$file_list 192 | } 193 | 194 | ARTIFACT_LIST_FILE="${BUILT_PRODUCTS_DIR}/cocoapods-artifacts-${CONFIGURATION}.txt" 195 | if [ -r "${ARTIFACT_LIST_FILE}" ]; then 196 | copy_artifacts "${ARTIFACT_LIST_FILE}" 197 | fi 198 | 199 | if [[ "$CONFIGURATION" == "Debug" ]]; then 200 | install_framework "${BUILT_PRODUCTS_DIR}/STTextView/STTextView.framework" 201 | fi 202 | if [[ "$CONFIGURATION" == "Release" ]]; then 203 | install_framework "${BUILT_PRODUCTS_DIR}/STTextView/STTextView.framework" 204 | fi 205 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 206 | wait 207 | fi 208 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_STTextViewExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_STTextViewExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/STTextView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/STTextView/STTextView.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "STTextView" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_STTextViewExample { 2 | umbrella header "Pods-STTextViewExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/STTextView" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/STTextView/STTextView.framework/Headers" 5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 6 | OTHER_LDFLAGS = $(inherited) -framework "STTextView" 7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 8 | PODS_BUILD_DIR = ${BUILD_DIR} 9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 13 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView-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 | FMWK 17 | CFBundleShortVersionString 18 | 1.1.3 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_STTextView : NSObject 3 | @end 4 | @implementation PodsDummy_STTextView 5 | @end 6 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double STTextViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char STTextViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/STTextView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../STTextView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView.modulemap: -------------------------------------------------------------------------------- 1 | framework module STTextView { 2 | umbrella header "STTextView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView.release.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/STTextView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../STTextView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES 11 | -------------------------------------------------------------------------------- /STTextViewExample/Pods/Target Support Files/STTextView/STTextView.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/STTextView 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS 4 | PODS_BUILD_DIR = ${BUILD_DIR} 5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 6 | PODS_ROOT = ${SRCROOT} 7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../../STTextView 8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 9 | SKIP_INSTALL = YES 10 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 51; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 476A134676814888ED3CE9C5 /* Pods_STTextViewExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 54CDFF34B9F391E2A8E24D99 /* Pods_STTextViewExample.framework */; }; 11 | 920B075A24DD48A000084AB5 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920B075924DD48A000084AB5 /* AppDelegate.swift */; }; 12 | 920B075C24DD48A000084AB5 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920B075B24DD48A000084AB5 /* SceneDelegate.swift */; }; 13 | 920B075E24DD48A000084AB5 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 920B075D24DD48A000084AB5 /* TableViewController.swift */; }; 14 | 920B076124DD48A000084AB5 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 920B075F24DD48A000084AB5 /* Main.storyboard */; }; 15 | 920B076324DD48A100084AB5 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 920B076224DD48A100084AB5 /* Assets.xcassets */; }; 16 | 920B076624DD48A100084AB5 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 920B076424DD48A100084AB5 /* LaunchScreen.storyboard */; }; 17 | /* End PBXBuildFile section */ 18 | 19 | /* Begin PBXFileReference section */ 20 | 0BD215597E72FB9D89C7784D /* Pods-STTextViewExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-STTextViewExample.release.xcconfig"; path = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.release.xcconfig"; sourceTree = ""; }; 21 | 54CDFF34B9F391E2A8E24D99 /* Pods_STTextViewExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_STTextViewExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 22 | 920B075624DD48A000084AB5 /* STTextViewExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = STTextViewExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | 920B075924DD48A000084AB5 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 24 | 920B075B24DD48A000084AB5 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = ""; }; 25 | 920B075D24DD48A000084AB5 /* TableViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 26 | 920B076024DD48A000084AB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 27 | 920B076224DD48A100084AB5 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 28 | 920B076524DD48A100084AB5 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 29 | 920B076724DD48A100084AB5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 30 | E664DEE2B168D82B35008634 /* Pods-STTextViewExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-STTextViewExample.debug.xcconfig"; path = "Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample.debug.xcconfig"; sourceTree = ""; }; 31 | /* End PBXFileReference section */ 32 | 33 | /* Begin PBXFrameworksBuildPhase section */ 34 | 920B075324DD48A000084AB5 /* Frameworks */ = { 35 | isa = PBXFrameworksBuildPhase; 36 | buildActionMask = 2147483647; 37 | files = ( 38 | 476A134676814888ED3CE9C5 /* Pods_STTextViewExample.framework in Frameworks */, 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXFrameworksBuildPhase section */ 43 | 44 | /* Begin PBXGroup section */ 45 | 920B074D24DD48A000084AB5 = { 46 | isa = PBXGroup; 47 | children = ( 48 | 920B075824DD48A000084AB5 /* STTextViewExample */, 49 | 920B075724DD48A000084AB5 /* Products */, 50 | 92B0BD0C108C448BF82FD848 /* Pods */, 51 | 9F84F04E76DFC9DD3642FBA1 /* Frameworks */, 52 | ); 53 | sourceTree = ""; 54 | }; 55 | 920B075724DD48A000084AB5 /* Products */ = { 56 | isa = PBXGroup; 57 | children = ( 58 | 920B075624DD48A000084AB5 /* STTextViewExample.app */, 59 | ); 60 | name = Products; 61 | sourceTree = ""; 62 | }; 63 | 920B075824DD48A000084AB5 /* STTextViewExample */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | 920B075924DD48A000084AB5 /* AppDelegate.swift */, 67 | 920B075B24DD48A000084AB5 /* SceneDelegate.swift */, 68 | 920B075D24DD48A000084AB5 /* TableViewController.swift */, 69 | 920B075F24DD48A000084AB5 /* Main.storyboard */, 70 | 920B076224DD48A100084AB5 /* Assets.xcassets */, 71 | 920B076424DD48A100084AB5 /* LaunchScreen.storyboard */, 72 | 920B076724DD48A100084AB5 /* Info.plist */, 73 | ); 74 | path = STTextViewExample; 75 | sourceTree = ""; 76 | }; 77 | 92B0BD0C108C448BF82FD848 /* Pods */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | E664DEE2B168D82B35008634 /* Pods-STTextViewExample.debug.xcconfig */, 81 | 0BD215597E72FB9D89C7784D /* Pods-STTextViewExample.release.xcconfig */, 82 | ); 83 | path = Pods; 84 | sourceTree = ""; 85 | }; 86 | 9F84F04E76DFC9DD3642FBA1 /* Frameworks */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 54CDFF34B9F391E2A8E24D99 /* Pods_STTextViewExample.framework */, 90 | ); 91 | name = Frameworks; 92 | sourceTree = ""; 93 | }; 94 | /* End PBXGroup section */ 95 | 96 | /* Begin PBXNativeTarget section */ 97 | 920B075524DD48A000084AB5 /* STTextViewExample */ = { 98 | isa = PBXNativeTarget; 99 | buildConfigurationList = 920B076A24DD48A100084AB5 /* Build configuration list for PBXNativeTarget "STTextViewExample" */; 100 | buildPhases = ( 101 | AED495E6009397F066222D17 /* [CP] Check Pods Manifest.lock */, 102 | 920B075224DD48A000084AB5 /* Sources */, 103 | 920B075324DD48A000084AB5 /* Frameworks */, 104 | 920B075424DD48A000084AB5 /* Resources */, 105 | 6949D934A7695F375ECEF857 /* [CP] Embed Pods Frameworks */, 106 | ); 107 | buildRules = ( 108 | ); 109 | dependencies = ( 110 | ); 111 | name = STTextViewExample; 112 | productName = STTextViewExample; 113 | productReference = 920B075624DD48A000084AB5 /* STTextViewExample.app */; 114 | productType = "com.apple.product-type.application"; 115 | }; 116 | /* End PBXNativeTarget section */ 117 | 118 | /* Begin PBXProject section */ 119 | 920B074E24DD48A000084AB5 /* Project object */ = { 120 | isa = PBXProject; 121 | attributes = { 122 | LastSwiftUpdateCheck = 1130; 123 | LastUpgradeCheck = 1130; 124 | ORGANIZATIONNAME = "onl1ner onl1ner"; 125 | TargetAttributes = { 126 | 920B075524DD48A000084AB5 = { 127 | CreatedOnToolsVersion = 11.3.1; 128 | }; 129 | }; 130 | }; 131 | buildConfigurationList = 920B075124DD48A000084AB5 /* Build configuration list for PBXProject "STTextViewExample" */; 132 | compatibilityVersion = "Xcode 9.3"; 133 | developmentRegion = en; 134 | hasScannedForEncodings = 0; 135 | knownRegions = ( 136 | en, 137 | Base, 138 | ); 139 | mainGroup = 920B074D24DD48A000084AB5; 140 | productRefGroup = 920B075724DD48A000084AB5 /* Products */; 141 | projectDirPath = ""; 142 | projectRoot = ""; 143 | targets = ( 144 | 920B075524DD48A000084AB5 /* STTextViewExample */, 145 | ); 146 | }; 147 | /* End PBXProject section */ 148 | 149 | /* Begin PBXResourcesBuildPhase section */ 150 | 920B075424DD48A000084AB5 /* Resources */ = { 151 | isa = PBXResourcesBuildPhase; 152 | buildActionMask = 2147483647; 153 | files = ( 154 | 920B076624DD48A100084AB5 /* LaunchScreen.storyboard in Resources */, 155 | 920B076324DD48A100084AB5 /* Assets.xcassets in Resources */, 156 | 920B076124DD48A000084AB5 /* Main.storyboard in Resources */, 157 | ); 158 | runOnlyForDeploymentPostprocessing = 0; 159 | }; 160 | /* End PBXResourcesBuildPhase section */ 161 | 162 | /* Begin PBXShellScriptBuildPhase section */ 163 | 6949D934A7695F375ECEF857 /* [CP] Embed Pods Frameworks */ = { 164 | isa = PBXShellScriptBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | ); 168 | inputFileListPaths = ( 169 | "${PODS_ROOT}/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", 170 | ); 171 | name = "[CP] Embed Pods Frameworks"; 172 | outputFileListPaths = ( 173 | "${PODS_ROOT}/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | shellPath = /bin/sh; 177 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-STTextViewExample/Pods-STTextViewExample-frameworks.sh\"\n"; 178 | showEnvVarsInLog = 0; 179 | }; 180 | AED495E6009397F066222D17 /* [CP] Check Pods Manifest.lock */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputFileListPaths = ( 186 | ); 187 | inputPaths = ( 188 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 189 | "${PODS_ROOT}/Manifest.lock", 190 | ); 191 | name = "[CP] Check Pods Manifest.lock"; 192 | outputFileListPaths = ( 193 | ); 194 | outputPaths = ( 195 | "$(DERIVED_FILE_DIR)/Pods-STTextViewExample-checkManifestLockResult.txt", 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | shellPath = /bin/sh; 199 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 200 | showEnvVarsInLog = 0; 201 | }; 202 | /* End PBXShellScriptBuildPhase section */ 203 | 204 | /* Begin PBXSourcesBuildPhase section */ 205 | 920B075224DD48A000084AB5 /* Sources */ = { 206 | isa = PBXSourcesBuildPhase; 207 | buildActionMask = 2147483647; 208 | files = ( 209 | 920B075E24DD48A000084AB5 /* TableViewController.swift in Sources */, 210 | 920B075A24DD48A000084AB5 /* AppDelegate.swift in Sources */, 211 | 920B075C24DD48A000084AB5 /* SceneDelegate.swift in Sources */, 212 | ); 213 | runOnlyForDeploymentPostprocessing = 0; 214 | }; 215 | /* End PBXSourcesBuildPhase section */ 216 | 217 | /* Begin PBXVariantGroup section */ 218 | 920B075F24DD48A000084AB5 /* Main.storyboard */ = { 219 | isa = PBXVariantGroup; 220 | children = ( 221 | 920B076024DD48A000084AB5 /* Base */, 222 | ); 223 | name = Main.storyboard; 224 | sourceTree = ""; 225 | }; 226 | 920B076424DD48A100084AB5 /* LaunchScreen.storyboard */ = { 227 | isa = PBXVariantGroup; 228 | children = ( 229 | 920B076524DD48A100084AB5 /* Base */, 230 | ); 231 | name = LaunchScreen.storyboard; 232 | sourceTree = ""; 233 | }; 234 | /* End PBXVariantGroup section */ 235 | 236 | /* Begin XCBuildConfiguration section */ 237 | 920B076824DD48A100084AB5 /* Debug */ = { 238 | isa = XCBuildConfiguration; 239 | buildSettings = { 240 | ALWAYS_SEARCH_USER_PATHS = NO; 241 | CLANG_ANALYZER_NONNULL = YES; 242 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_ENABLE_MODULES = YES; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_ENABLE_OBJC_WEAK = YES; 248 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 249 | CLANG_WARN_BOOL_CONVERSION = YES; 250 | CLANG_WARN_COMMA = YES; 251 | CLANG_WARN_CONSTANT_CONVERSION = YES; 252 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 253 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 254 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 255 | CLANG_WARN_EMPTY_BODY = YES; 256 | CLANG_WARN_ENUM_CONVERSION = YES; 257 | CLANG_WARN_INFINITE_RECURSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 260 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 261 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 262 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 263 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 264 | CLANG_WARN_STRICT_PROTOTYPES = YES; 265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 266 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 267 | CLANG_WARN_UNREACHABLE_CODE = YES; 268 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 269 | COPY_PHASE_STRIP = NO; 270 | DEBUG_INFORMATION_FORMAT = dwarf; 271 | ENABLE_STRICT_OBJC_MSGSEND = YES; 272 | ENABLE_TESTABILITY = YES; 273 | GCC_C_LANGUAGE_STANDARD = gnu11; 274 | GCC_DYNAMIC_NO_PIC = NO; 275 | GCC_NO_COMMON_BLOCKS = YES; 276 | GCC_OPTIMIZATION_LEVEL = 0; 277 | GCC_PREPROCESSOR_DEFINITIONS = ( 278 | "DEBUG=1", 279 | "$(inherited)", 280 | ); 281 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 282 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 283 | GCC_WARN_UNDECLARED_SELECTOR = YES; 284 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 285 | GCC_WARN_UNUSED_FUNCTION = YES; 286 | GCC_WARN_UNUSED_VARIABLE = YES; 287 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 288 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 289 | MTL_FAST_MATH = YES; 290 | ONLY_ACTIVE_ARCH = YES; 291 | SDKROOT = iphoneos; 292 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 293 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 294 | }; 295 | name = Debug; 296 | }; 297 | 920B076924DD48A100084AB5 /* Release */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | CLANG_ANALYZER_NONNULL = YES; 302 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 303 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_ENABLE_MODULES = YES; 306 | CLANG_ENABLE_OBJC_ARC = YES; 307 | CLANG_ENABLE_OBJC_WEAK = YES; 308 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 309 | CLANG_WARN_BOOL_CONVERSION = YES; 310 | CLANG_WARN_COMMA = YES; 311 | CLANG_WARN_CONSTANT_CONVERSION = YES; 312 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 313 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 314 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 315 | CLANG_WARN_EMPTY_BODY = YES; 316 | CLANG_WARN_ENUM_CONVERSION = YES; 317 | CLANG_WARN_INFINITE_RECURSION = YES; 318 | CLANG_WARN_INT_CONVERSION = YES; 319 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 320 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 321 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 323 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 324 | CLANG_WARN_STRICT_PROTOTYPES = YES; 325 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 326 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 327 | CLANG_WARN_UNREACHABLE_CODE = YES; 328 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 329 | COPY_PHASE_STRIP = NO; 330 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 331 | ENABLE_NS_ASSERTIONS = NO; 332 | ENABLE_STRICT_OBJC_MSGSEND = YES; 333 | GCC_C_LANGUAGE_STANDARD = gnu11; 334 | GCC_NO_COMMON_BLOCKS = YES; 335 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 336 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 337 | GCC_WARN_UNDECLARED_SELECTOR = YES; 338 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 339 | GCC_WARN_UNUSED_FUNCTION = YES; 340 | GCC_WARN_UNUSED_VARIABLE = YES; 341 | IPHONEOS_DEPLOYMENT_TARGET = 13.2; 342 | MTL_ENABLE_DEBUG_INFO = NO; 343 | MTL_FAST_MATH = YES; 344 | SDKROOT = iphoneos; 345 | SWIFT_COMPILATION_MODE = wholemodule; 346 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 347 | VALIDATE_PRODUCT = YES; 348 | }; 349 | name = Release; 350 | }; 351 | 920B076B24DD48A100084AB5 /* Debug */ = { 352 | isa = XCBuildConfiguration; 353 | baseConfigurationReference = E664DEE2B168D82B35008634 /* Pods-STTextViewExample.debug.xcconfig */; 354 | buildSettings = { 355 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 356 | CODE_SIGN_STYLE = Automatic; 357 | DEVELOPMENT_TEAM = H72YUS24CN; 358 | INFOPLIST_FILE = STTextViewExample/Info.plist; 359 | LD_RUNPATH_SEARCH_PATHS = ( 360 | "$(inherited)", 361 | "@executable_path/Frameworks", 362 | ); 363 | PRODUCT_BUNDLE_IDENTIFIER = onl1ner.STTextViewExample; 364 | PRODUCT_NAME = "$(TARGET_NAME)"; 365 | SWIFT_VERSION = 5.0; 366 | TARGETED_DEVICE_FAMILY = 1; 367 | }; 368 | name = Debug; 369 | }; 370 | 920B076C24DD48A100084AB5 /* Release */ = { 371 | isa = XCBuildConfiguration; 372 | baseConfigurationReference = 0BD215597E72FB9D89C7784D /* Pods-STTextViewExample.release.xcconfig */; 373 | buildSettings = { 374 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 375 | CODE_SIGN_STYLE = Automatic; 376 | DEVELOPMENT_TEAM = H72YUS24CN; 377 | INFOPLIST_FILE = STTextViewExample/Info.plist; 378 | LD_RUNPATH_SEARCH_PATHS = ( 379 | "$(inherited)", 380 | "@executable_path/Frameworks", 381 | ); 382 | PRODUCT_BUNDLE_IDENTIFIER = onl1ner.STTextViewExample; 383 | PRODUCT_NAME = "$(TARGET_NAME)"; 384 | SWIFT_VERSION = 5.0; 385 | TARGETED_DEVICE_FAMILY = 1; 386 | }; 387 | name = Release; 388 | }; 389 | /* End XCBuildConfiguration section */ 390 | 391 | /* Begin XCConfigurationList section */ 392 | 920B075124DD48A000084AB5 /* Build configuration list for PBXProject "STTextViewExample" */ = { 393 | isa = XCConfigurationList; 394 | buildConfigurations = ( 395 | 920B076824DD48A100084AB5 /* Debug */, 396 | 920B076924DD48A100084AB5 /* Release */, 397 | ); 398 | defaultConfigurationIsVisible = 0; 399 | defaultConfigurationName = Release; 400 | }; 401 | 920B076A24DD48A100084AB5 /* Build configuration list for PBXNativeTarget "STTextViewExample" */ = { 402 | isa = XCConfigurationList; 403 | buildConfigurations = ( 404 | 920B076B24DD48A100084AB5 /* Debug */, 405 | 920B076C24DD48A100084AB5 /* Release */, 406 | ); 407 | defaultConfigurationIsVisible = 0; 408 | defaultConfigurationName = Release; 409 | }; 410 | /* End XCConfigurationList section */ 411 | }; 412 | rootObject = 920B074E24DD48A000084AB5 /* Project object */; 413 | } 414 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcodeproj/project.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample.xcodeproj/project.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcodeproj/xcuserdata/onl1ner.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | STTextViewExample.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 2 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample.xcworkspace/xcuserdata/onl1ner.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // STTextViewExample 4 | // 5 | // Created by onl1ner onl1ner on 07/08/2020. 6 | // Copyright © 2020 onl1ner onl1ner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | // MARK: UISceneSession Lifecycle 22 | 23 | func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration { 24 | // Called when a new scene session is being created. 25 | // Use this method to select a configuration to create the new scene with. 26 | return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role) 27 | } 28 | 29 | func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set) { 30 | // Called when the user discards a scene session. 31 | // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions. 32 | // Use this method to release any resources that were specific to the discarded scenes, as they will not return. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom": "iphone", 6 | "filename" : "Icon-20@2x.png", 7 | "scale": "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom": "iphone", 12 | "filename" : "Icon-20@3x.png", 13 | "scale": "3x" 14 | }, 15 | { 16 | "size" : "20x20", 17 | "idiom": "ipad", 18 | "filename" : "Icon-20.png", 19 | "scale": "1x" 20 | }, 21 | { 22 | "size" : "20x20", 23 | "idiom": "ipad", 24 | "filename" : "Icon-20@2x.png", 25 | "scale": "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-29@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "29x29", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-29@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-40@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "40x40", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-40@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-60@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "Icon-60@3x.png", 61 | "scale" : "3x" 62 | }, 63 | { 64 | "size" : "29x29", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-29.png", 67 | "scale" : "1x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-29@2x.png", 73 | "scale" : "2x" 74 | }, 75 | { 76 | "size" : "40x40", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-40.png", 79 | "scale" : "1x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-40@2x.png", 85 | "scale" : "2x" 86 | }, 87 | { 88 | "size" : "76x76", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-76.png", 91 | "scale" : "1x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-76@2x.png", 97 | "scale" : "2x" 98 | }, 99 | { 100 | "size" : "83.5x83.5", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-83.5@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "1024x1024", 107 | "idiom" : "ios-marketing", 108 | "filename" : "Icon-1024.png", 109 | "scale" : "1x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-1024.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-20@3x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-29@3x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-40@3x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onl1ner/STTextView/f414d0e74d7862a601549774f58307017c1f5cb4/STTextViewExample/STTextViewExample/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/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 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/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 | 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 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | $(PRODUCT_BUNDLE_PACKAGE_TYPE) 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIApplicationSceneManifest 24 | 25 | UIApplicationSupportsMultipleScenes 26 | 27 | UISceneConfigurations 28 | 29 | UIWindowSceneSessionRoleApplication 30 | 31 | 32 | UISceneConfigurationName 33 | Default Configuration 34 | UISceneDelegateClassName 35 | $(PRODUCT_MODULE_NAME).SceneDelegate 36 | UISceneStoryboardFile 37 | Main 38 | 39 | 40 | 41 | 42 | UILaunchStoryboardName 43 | LaunchScreen 44 | UIMainStoryboardFile 45 | Main 46 | UIRequiredDeviceCapabilities 47 | 48 | armv7 49 | 50 | UISupportedInterfaceOrientations 51 | 52 | UIInterfaceOrientationPortrait 53 | UIInterfaceOrientationLandscapeLeft 54 | UIInterfaceOrientationLandscapeRight 55 | 56 | UISupportedInterfaceOrientations~ipad 57 | 58 | UIInterfaceOrientationPortrait 59 | UIInterfaceOrientationPortraitUpsideDown 60 | UIInterfaceOrientationLandscapeLeft 61 | UIInterfaceOrientationLandscapeRight 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/SceneDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SceneDelegate.swift 3 | // STTextViewExample 4 | // 5 | // Created by onl1ner onl1ner on 07/08/2020. 6 | // Copyright © 2020 onl1ner onl1ner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class SceneDelegate: UIResponder, UIWindowSceneDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { 17 | // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`. 18 | // If using a storyboard, the `window` property will automatically be initialized and attached to the scene. 19 | // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead). 20 | guard let _ = (scene as? UIWindowScene) else { return } 21 | } 22 | 23 | func sceneDidDisconnect(_ scene: UIScene) { 24 | // Called as the scene is being released by the system. 25 | // This occurs shortly after the scene enters the background, or when its session is discarded. 26 | // Release any resources associated with this scene that can be re-created the next time the scene connects. 27 | // The scene may re-connect later, as its session was not neccessarily discarded (see `application:didDiscardSceneSessions` instead). 28 | } 29 | 30 | func sceneDidBecomeActive(_ scene: UIScene) { 31 | // Called when the scene has moved from an inactive state to an active state. 32 | // Use this method to restart any tasks that were paused (or not yet started) when the scene was inactive. 33 | } 34 | 35 | func sceneWillResignActive(_ scene: UIScene) { 36 | // Called when the scene will move from an active state to an inactive state. 37 | // This may occur due to temporary interruptions (ex. an incoming phone call). 38 | } 39 | 40 | func sceneWillEnterForeground(_ scene: UIScene) { 41 | // Called as the scene transitions from the background to the foreground. 42 | // Use this method to undo the changes made on entering the background. 43 | } 44 | 45 | func sceneDidEnterBackground(_ scene: UIScene) { 46 | // Called as the scene transitions from the foreground to the background. 47 | // Use this method to save data, release shared resources, and store enough scene-specific state information 48 | // to restore the scene back to its current state. 49 | } 50 | 51 | 52 | } 53 | 54 | -------------------------------------------------------------------------------- /STTextViewExample/STTextViewExample/TableViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableViewController.swift 3 | // STTextViewExample 4 | // 5 | // Created by onl1ner onl1ner on 07/08/2020. 6 | // Copyright © 2020 onl1ner onl1ner. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import STTextView 11 | 12 | class TableViewController: UITableViewController { 13 | @IBOutlet var placeholderTextView: STTextView! 14 | @IBOutlet var attributedPlaceholderTextView: STTextView! 15 | 16 | @IBOutlet var hidePlaceholderSwitch: UISwitch! 17 | 18 | @objc private func switchValueChanged(_ sender : UISwitch) { 19 | placeholderTextView.shouldHidePlaceholderOnEditing = sender.isOn 20 | } 21 | 22 | @objc private func shouldEndEditing(_ sender : UITapGestureRecognizer) -> () { 23 | view.endEditing(true) 24 | } 25 | 26 | private func attributedTextExample() -> NSAttributedString { 27 | let attributes: [NSAttributedString.Key: Any] = [ 28 | .underlineStyle : NSUnderlineStyle.single.rawValue, 29 | .font : UIFont.systemFont(ofSize: 15) 30 | ] 31 | 32 | return NSAttributedString(string: "Beautiful attributed placeholder text", attributes: attributes) 33 | } 34 | 35 | private func addTapGesture() -> () { 36 | let tapGesture = UITapGestureRecognizer(target: self, action: #selector(shouldEndEditing(_:))) 37 | tapGesture.cancelsTouchesInView = false 38 | self.view.addGestureRecognizer(tapGesture) 39 | } 40 | 41 | override func viewDidLoad() { 42 | super.viewDidLoad() 43 | 44 | // Note: You could also change the placeholder by using Interface Builder. 45 | placeholderTextView.placeholder = "Beautiful placeholder text!" 46 | placeholderTextView.shouldHidePlaceholderOnEditing = hidePlaceholderSwitch.isOn 47 | 48 | attributedPlaceholderTextView.attributedPlaceholder = attributedTextExample() 49 | attributedPlaceholderTextView.placeholderColor = .secondaryLabel 50 | 51 | hidePlaceholderSwitch.addTarget(self, action: #selector(switchValueChanged(_:)), for: .valueChanged) 52 | addTapGesture() 53 | } 54 | } 55 | 56 | --------------------------------------------------------------------------------