├── .gitignore ├── Demo ├── GCPlaceholderTextViewDemo.xcodeproj │ └── project.pbxproj └── GCPlaceholderTextViewDemo │ ├── GCPlaceholderTextViewDemo-Info.plist │ ├── GCPlaceholderTextViewDemo-Prefix.pch │ ├── GCPlaceholderTextViewDemoAppDelegate.h │ ├── GCPlaceholderTextViewDemoAppDelegate.m │ ├── GCPlaceholderTextViewDemoViewController.h │ ├── GCPlaceholderTextViewDemoViewController.m │ ├── en.lproj │ ├── GCPlaceholderTextViewDemoViewController.xib │ ├── InfoPlist.strings │ └── MainWindow.xib │ └── main.m ├── GCPlaceholderTextView ├── GCPlaceholderTextView.h └── GCPlaceholderTextView.m ├── LICENSE.txt └── README.textile /.gitignore: -------------------------------------------------------------------------------- 1 | # Mac OS X 2 | *.DS_Store 3 | 4 | # Xcode 5 | *.pbxuser 6 | *.mode1v3 7 | *.mode2v3 8 | *.perspectivev3 9 | *.xcuserstate 10 | project.xcworkspace/ 11 | xcuserdata/ 12 | 13 | # Generated files 14 | build/ 15 | *.[oa] 16 | *.pyc 17 | 18 | # Backup files 19 | *~.nib -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | B0B559FA1361DFFA00A8E980 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0B559F91361DFFA00A8E980 /* UIKit.framework */; }; 11 | B0B559FC1361DFFA00A8E980 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0B559FB1361DFFA00A8E980 /* Foundation.framework */; }; 12 | B0B559FE1361DFFA00A8E980 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B0B559FD1361DFFA00A8E980 /* CoreGraphics.framework */; }; 13 | B0B55A041361DFFA00A8E980 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = B0B55A021361DFFA00A8E980 /* InfoPlist.strings */; }; 14 | B0B55A071361DFFA00A8E980 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = B0B55A061361DFFA00A8E980 /* main.m */; }; 15 | B0B55A0A1361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = B0B55A091361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.m */; }; 16 | B0B55A0D1361DFFA00A8E980 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B0B55A0B1361DFFA00A8E980 /* MainWindow.xib */; }; 17 | B0B55A101361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = B0B55A0F1361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.m */; }; 18 | B0B55A131361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = B0B55A111361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.xib */; }; 19 | B0B55A241361E01800A8E980 /* GCPlaceholderTextView.m in Sources */ = {isa = PBXBuildFile; fileRef = B0B55A231361E01800A8E980 /* GCPlaceholderTextView.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | B0B559F51361DFFA00A8E980 /* GCPlaceholderTextViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = GCPlaceholderTextViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | B0B559F91361DFFA00A8E980 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 25 | B0B559FB1361DFFA00A8E980 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 26 | B0B559FD1361DFFA00A8E980 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 27 | B0B55A011361DFFA00A8E980 /* GCPlaceholderTextViewDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GCPlaceholderTextViewDemo-Info.plist"; sourceTree = ""; }; 28 | B0B55A031361DFFA00A8E980 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 29 | B0B55A051361DFFA00A8E980 /* GCPlaceholderTextViewDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "GCPlaceholderTextViewDemo-Prefix.pch"; sourceTree = ""; }; 30 | B0B55A061361DFFA00A8E980 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 31 | B0B55A081361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCPlaceholderTextViewDemoAppDelegate.h; sourceTree = ""; }; 32 | B0B55A091361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GCPlaceholderTextViewDemoAppDelegate.m; sourceTree = ""; }; 33 | B0B55A0C1361DFFA00A8E980 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainWindow.xib; sourceTree = ""; }; 34 | B0B55A0E1361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GCPlaceholderTextViewDemoViewController.h; sourceTree = ""; }; 35 | B0B55A0F1361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GCPlaceholderTextViewDemoViewController.m; sourceTree = ""; }; 36 | B0B55A121361DFFA00A8E980 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/GCPlaceholderTextViewDemoViewController.xib; sourceTree = ""; }; 37 | B0B55A221361E01800A8E980 /* GCPlaceholderTextView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCPlaceholderTextView.h; sourceTree = ""; }; 38 | B0B55A231361E01800A8E980 /* GCPlaceholderTextView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCPlaceholderTextView.m; sourceTree = ""; }; 39 | /* End PBXFileReference section */ 40 | 41 | /* Begin PBXFrameworksBuildPhase section */ 42 | B0B559F21361DFFA00A8E980 /* Frameworks */ = { 43 | isa = PBXFrameworksBuildPhase; 44 | buildActionMask = 2147483647; 45 | files = ( 46 | B0B559FA1361DFFA00A8E980 /* UIKit.framework in Frameworks */, 47 | B0B559FC1361DFFA00A8E980 /* Foundation.framework in Frameworks */, 48 | B0B559FE1361DFFA00A8E980 /* CoreGraphics.framework in Frameworks */, 49 | ); 50 | runOnlyForDeploymentPostprocessing = 0; 51 | }; 52 | /* End PBXFrameworksBuildPhase section */ 53 | 54 | /* Begin PBXGroup section */ 55 | B0B559EA1361DFFA00A8E980 = { 56 | isa = PBXGroup; 57 | children = ( 58 | B0B55A211361E01800A8E980 /* GCPlaceholderTextView */, 59 | B0B559FF1361DFFA00A8E980 /* GCPlaceholderTextViewDemo */, 60 | B0B559F81361DFFA00A8E980 /* Frameworks */, 61 | B0B559F61361DFFA00A8E980 /* Products */, 62 | ); 63 | sourceTree = ""; 64 | }; 65 | B0B559F61361DFFA00A8E980 /* Products */ = { 66 | isa = PBXGroup; 67 | children = ( 68 | B0B559F51361DFFA00A8E980 /* GCPlaceholderTextViewDemo.app */, 69 | ); 70 | name = Products; 71 | sourceTree = ""; 72 | }; 73 | B0B559F81361DFFA00A8E980 /* Frameworks */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | B0B559F91361DFFA00A8E980 /* UIKit.framework */, 77 | B0B559FB1361DFFA00A8E980 /* Foundation.framework */, 78 | B0B559FD1361DFFA00A8E980 /* CoreGraphics.framework */, 79 | ); 80 | name = Frameworks; 81 | sourceTree = ""; 82 | }; 83 | B0B559FF1361DFFA00A8E980 /* GCPlaceholderTextViewDemo */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | B0B55A081361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.h */, 87 | B0B55A091361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.m */, 88 | B0B55A0E1361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.h */, 89 | B0B55A0F1361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.m */, 90 | B0B55A111361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.xib */, 91 | B0B55A001361DFFA00A8E980 /* Supporting Files */, 92 | ); 93 | path = GCPlaceholderTextViewDemo; 94 | sourceTree = ""; 95 | }; 96 | B0B55A001361DFFA00A8E980 /* Supporting Files */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | B0B55A0B1361DFFA00A8E980 /* MainWindow.xib */, 100 | B0B55A011361DFFA00A8E980 /* GCPlaceholderTextViewDemo-Info.plist */, 101 | B0B55A021361DFFA00A8E980 /* InfoPlist.strings */, 102 | B0B55A051361DFFA00A8E980 /* GCPlaceholderTextViewDemo-Prefix.pch */, 103 | B0B55A061361DFFA00A8E980 /* main.m */, 104 | ); 105 | name = "Supporting Files"; 106 | sourceTree = ""; 107 | }; 108 | B0B55A211361E01800A8E980 /* GCPlaceholderTextView */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | B0B55A221361E01800A8E980 /* GCPlaceholderTextView.h */, 112 | B0B55A231361E01800A8E980 /* GCPlaceholderTextView.m */, 113 | ); 114 | name = GCPlaceholderTextView; 115 | path = ../GCPlaceholderTextView; 116 | sourceTree = ""; 117 | }; 118 | /* End PBXGroup section */ 119 | 120 | /* Begin PBXNativeTarget section */ 121 | B0B559F41361DFFA00A8E980 /* GCPlaceholderTextViewDemo */ = { 122 | isa = PBXNativeTarget; 123 | buildConfigurationList = B0B55A161361DFFA00A8E980 /* Build configuration list for PBXNativeTarget "GCPlaceholderTextViewDemo" */; 124 | buildPhases = ( 125 | B0B559F11361DFFA00A8E980 /* Sources */, 126 | B0B559F21361DFFA00A8E980 /* Frameworks */, 127 | B0B559F31361DFFA00A8E980 /* Resources */, 128 | ); 129 | buildRules = ( 130 | ); 131 | dependencies = ( 132 | ); 133 | name = GCPlaceholderTextViewDemo; 134 | productName = GCPlaceholderTextViewDemo; 135 | productReference = B0B559F51361DFFA00A8E980 /* GCPlaceholderTextViewDemo.app */; 136 | productType = "com.apple.product-type.application"; 137 | }; 138 | /* End PBXNativeTarget section */ 139 | 140 | /* Begin PBXProject section */ 141 | B0B559EC1361DFFA00A8E980 /* Project object */ = { 142 | isa = PBXProject; 143 | attributes = { 144 | LastUpgradeCheck = 0460; 145 | ORGANIZATIONNAME = LittleKiwi; 146 | }; 147 | buildConfigurationList = B0B559EF1361DFFA00A8E980 /* Build configuration list for PBXProject "GCPlaceholderTextViewDemo" */; 148 | compatibilityVersion = "Xcode 3.2"; 149 | developmentRegion = English; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | ); 154 | mainGroup = B0B559EA1361DFFA00A8E980; 155 | productRefGroup = B0B559F61361DFFA00A8E980 /* Products */; 156 | projectDirPath = ""; 157 | projectRoot = ""; 158 | targets = ( 159 | B0B559F41361DFFA00A8E980 /* GCPlaceholderTextViewDemo */, 160 | ); 161 | }; 162 | /* End PBXProject section */ 163 | 164 | /* Begin PBXResourcesBuildPhase section */ 165 | B0B559F31361DFFA00A8E980 /* Resources */ = { 166 | isa = PBXResourcesBuildPhase; 167 | buildActionMask = 2147483647; 168 | files = ( 169 | B0B55A041361DFFA00A8E980 /* InfoPlist.strings in Resources */, 170 | B0B55A0D1361DFFA00A8E980 /* MainWindow.xib in Resources */, 171 | B0B55A131361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.xib in Resources */, 172 | ); 173 | runOnlyForDeploymentPostprocessing = 0; 174 | }; 175 | /* End PBXResourcesBuildPhase section */ 176 | 177 | /* Begin PBXSourcesBuildPhase section */ 178 | B0B559F11361DFFA00A8E980 /* Sources */ = { 179 | isa = PBXSourcesBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | B0B55A071361DFFA00A8E980 /* main.m in Sources */, 183 | B0B55A0A1361DFFA00A8E980 /* GCPlaceholderTextViewDemoAppDelegate.m in Sources */, 184 | B0B55A101361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.m in Sources */, 185 | B0B55A241361E01800A8E980 /* GCPlaceholderTextView.m in Sources */, 186 | ); 187 | runOnlyForDeploymentPostprocessing = 0; 188 | }; 189 | /* End PBXSourcesBuildPhase section */ 190 | 191 | /* Begin PBXVariantGroup section */ 192 | B0B55A021361DFFA00A8E980 /* InfoPlist.strings */ = { 193 | isa = PBXVariantGroup; 194 | children = ( 195 | B0B55A031361DFFA00A8E980 /* en */, 196 | ); 197 | name = InfoPlist.strings; 198 | sourceTree = ""; 199 | }; 200 | B0B55A0B1361DFFA00A8E980 /* MainWindow.xib */ = { 201 | isa = PBXVariantGroup; 202 | children = ( 203 | B0B55A0C1361DFFA00A8E980 /* en */, 204 | ); 205 | name = MainWindow.xib; 206 | sourceTree = ""; 207 | }; 208 | B0B55A111361DFFA00A8E980 /* GCPlaceholderTextViewDemoViewController.xib */ = { 209 | isa = PBXVariantGroup; 210 | children = ( 211 | B0B55A121361DFFA00A8E980 /* en */, 212 | ); 213 | name = GCPlaceholderTextViewDemoViewController.xib; 214 | sourceTree = ""; 215 | }; 216 | /* End PBXVariantGroup section */ 217 | 218 | /* Begin XCBuildConfiguration section */ 219 | B0B55A141361DFFA00A8E980 /* Debug */ = { 220 | isa = XCBuildConfiguration; 221 | buildSettings = { 222 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 223 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 224 | GCC_C_LANGUAGE_STANDARD = gnu99; 225 | GCC_OPTIMIZATION_LEVEL = 0; 226 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG; 227 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 228 | GCC_VERSION = com.apple.compilers.llvmgcc42; 229 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 230 | GCC_WARN_UNUSED_VARIABLE = YES; 231 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 232 | SDKROOT = iphoneos; 233 | }; 234 | name = Debug; 235 | }; 236 | B0B55A151361DFFA00A8E980 /* Release */ = { 237 | isa = XCBuildConfiguration; 238 | buildSettings = { 239 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 240 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 241 | GCC_C_LANGUAGE_STANDARD = gnu99; 242 | GCC_VERSION = com.apple.compilers.llvmgcc42; 243 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 244 | GCC_WARN_UNUSED_VARIABLE = YES; 245 | IPHONEOS_DEPLOYMENT_TARGET = 4.3; 246 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 247 | SDKROOT = iphoneos; 248 | }; 249 | name = Release; 250 | }; 251 | B0B55A171361DFFA00A8E980 /* Debug */ = { 252 | isa = XCBuildConfiguration; 253 | buildSettings = { 254 | ALWAYS_SEARCH_USER_PATHS = NO; 255 | CLANG_ENABLE_OBJC_ARC = YES; 256 | COPY_PHASE_STRIP = NO; 257 | GCC_DYNAMIC_NO_PIC = NO; 258 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 259 | GCC_PREFIX_HEADER = "GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Prefix.pch"; 260 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 261 | INFOPLIST_FILE = "GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Info.plist"; 262 | PRODUCT_NAME = "$(TARGET_NAME)"; 263 | WRAPPER_EXTENSION = app; 264 | }; 265 | name = Debug; 266 | }; 267 | B0B55A181361DFFA00A8E980 /* Release */ = { 268 | isa = XCBuildConfiguration; 269 | buildSettings = { 270 | ALWAYS_SEARCH_USER_PATHS = NO; 271 | CLANG_ENABLE_OBJC_ARC = YES; 272 | COPY_PHASE_STRIP = YES; 273 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 274 | GCC_PREFIX_HEADER = "GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Prefix.pch"; 275 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 276 | INFOPLIST_FILE = "GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Info.plist"; 277 | PRODUCT_NAME = "$(TARGET_NAME)"; 278 | VALIDATE_PRODUCT = YES; 279 | WRAPPER_EXTENSION = app; 280 | }; 281 | name = Release; 282 | }; 283 | /* End XCBuildConfiguration section */ 284 | 285 | /* Begin XCConfigurationList section */ 286 | B0B559EF1361DFFA00A8E980 /* Build configuration list for PBXProject "GCPlaceholderTextViewDemo" */ = { 287 | isa = XCConfigurationList; 288 | buildConfigurations = ( 289 | B0B55A141361DFFA00A8E980 /* Debug */, 290 | B0B55A151361DFFA00A8E980 /* Release */, 291 | ); 292 | defaultConfigurationIsVisible = 0; 293 | defaultConfigurationName = Release; 294 | }; 295 | B0B55A161361DFFA00A8E980 /* Build configuration list for PBXNativeTarget "GCPlaceholderTextViewDemo" */ = { 296 | isa = XCConfigurationList; 297 | buildConfigurations = ( 298 | B0B55A171361DFFA00A8E980 /* Debug */, 299 | B0B55A181361DFFA00A8E980 /* Release */, 300 | ); 301 | defaultConfigurationIsVisible = 0; 302 | defaultConfigurationName = Release; 303 | }; 304 | /* End XCConfigurationList section */ 305 | }; 306 | rootObject = B0B559EC1361DFFA00A8E980 /* Project object */; 307 | } 308 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.guillaumecampagna.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleShortVersionString 22 | 1.0 23 | CFBundleSignature 24 | ???? 25 | CFBundleVersion 26 | 1.0 27 | LSRequiresIPhoneOS 28 | 29 | NSMainNibFile 30 | MainWindow 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'GCPlaceholderTextViewDemo' target in the 'GCPlaceholderTextViewDemo' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextViewDemoAppDelegate.h 3 | // GCPlaceholderTextViewDemo 4 | // 5 | // Created by Guillaume Campagna on 11-04-22. 6 | // Copyright 2011 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @class GCPlaceholderTextViewDemoViewController; 12 | 13 | @interface GCPlaceholderTextViewDemoAppDelegate : NSObject 14 | 15 | @property (nonatomic, strong) IBOutlet UIWindow *window; 16 | @property (nonatomic, strong) IBOutlet GCPlaceholderTextViewDemoViewController *viewController; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextViewDemoAppDelegate.m 3 | // GCPlaceholderTextViewDemo 4 | // 5 | // Created by Guillaume Campagna on 11-04-22. 6 | // Copyright 2011 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import "GCPlaceholderTextViewDemoAppDelegate.h" 10 | 11 | #import "GCPlaceholderTextViewDemoViewController.h" 12 | 13 | @implementation GCPlaceholderTextViewDemoAppDelegate 14 | 15 | @synthesize window=_window; 16 | @synthesize viewController=_viewController; 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | self.window.rootViewController = self.viewController; 20 | [self.window makeKeyAndVisible]; 21 | return YES; 22 | } 23 | 24 | 25 | @end 26 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextViewDemoViewController.h 3 | // GCPlaceholderTextViewDemo 4 | // 5 | // Created by Guillaume Campagna on 11-04-22. 6 | // Copyright 2011 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "GCPlaceholderTextView.h" 11 | 12 | @interface GCPlaceholderTextViewDemoViewController : UIViewController 13 | 14 | @property (nonatomic, strong) IBOutlet GCPlaceholderTextView *textView; 15 | 16 | - (IBAction)finish:(id)sender; 17 | - (IBAction)refreshText:(id)sender; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/GCPlaceholderTextViewDemoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextViewDemoViewController.m 3 | // GCPlaceholderTextViewDemo 4 | // 5 | // Created by Guillaume Campagna on 11-04-22. 6 | // Copyright 2011 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import "GCPlaceholderTextViewDemoViewController.h" 10 | 11 | @implementation GCPlaceholderTextViewDemoViewController 12 | 13 | @synthesize textView; 14 | 15 | - (void)viewDidLoad { 16 | [super viewDidLoad]; 17 | 18 | self.textView.placeholderColor = [UIColor redColor]; 19 | self.textView.placeholder = NSLocalizedString(@"This is a placeholder",); 20 | } 21 | 22 | - (IBAction)finish:(id)sender { 23 | [self.textView resignFirstResponder]; 24 | } 25 | 26 | - (IBAction)refreshText:(id)sender { 27 | [self.textView setText:@""]; 28 | } 29 | 30 | 31 | - (void)viewDidUnload 32 | { 33 | [self setTextView:nil]; 34 | [super viewDidUnload]; 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/en.lproj/GCPlaceholderTextViewDemoViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1552 5 | 12D78 6 | 3084 7 | 1187.37 8 | 626.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 2083 12 | 13 | 14 | YES 15 | IBProxyObject 16 | IBUIBarButtonItem 17 | IBUINavigationBar 18 | IBUINavigationItem 19 | IBUITextView 20 | IBUIView 21 | 22 | 23 | YES 24 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 25 | 26 | 27 | PluginDependencyRecalculationVersion 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | 42 | 274 43 | 44 | YES 45 | 46 | 47 | 274 48 | {{0, 44}, {320, 416}} 49 | 50 | 51 | 1 52 | MSAxIDEAA 53 | 54 | YES 55 | YES 56 | IBCocoaTouchFramework 57 | 58 | 59 | 2 60 | IBCocoaTouchFramework 61 | 62 | 63 | Helvetica 64 | Helvetica 65 | 0 66 | 17 67 | 68 | 69 | Helvetica 70 | 17 71 | 16 72 | 73 | 74 | 75 | 76 | 290 77 | {320, 44} 78 | 79 | IBCocoaTouchFramework 80 | 81 | YES 82 | 83 | 84 | Demo 85 | 86 | IBCocoaTouchFramework 87 | 1 88 | 89 | 16 90 | 91 | 92 | IBCocoaTouchFramework 93 | 1 94 | 95 | 0 96 | 97 | IBCocoaTouchFramework 98 | 99 | 100 | 101 | 102 | {{0, 20}, {320, 460}} 103 | 104 | 105 | 106 | 3 107 | MC43NQA 108 | 109 | 2 110 | 111 | 112 | NO 113 | 114 | IBCocoaTouchFramework 115 | 116 | 117 | 118 | 119 | YES 120 | 121 | 122 | view 123 | 124 | 125 | 126 | 7 127 | 128 | 129 | 130 | textView 131 | 132 | 133 | 134 | 10 135 | 136 | 137 | 138 | finish: 139 | 140 | 141 | 142 | 15 143 | 144 | 145 | 146 | refreshText: 147 | 148 | 149 | 150 | 17 151 | 152 | 153 | 154 | 155 | YES 156 | 157 | 0 158 | 159 | YES 160 | 161 | 162 | 163 | 164 | 165 | -1 166 | 167 | 168 | File's Owner 169 | 170 | 171 | -2 172 | 173 | 174 | 175 | 176 | 6 177 | 178 | 179 | YES 180 | 181 | 182 | 183 | 184 | 185 | 186 | 8 187 | 188 | 189 | 190 | 191 | 11 192 | 193 | 194 | YES 195 | 196 | 197 | 198 | 199 | 200 | 13 201 | 202 | 203 | YES 204 | 205 | 206 | 207 | 208 | 209 | 210 | 14 211 | 212 | 213 | 214 | 215 | 16 216 | 217 | 218 | 219 | 220 | 221 | 222 | YES 223 | 224 | YES 225 | -1.CustomClassName 226 | -1.IBPluginDependency 227 | -2.CustomClassName 228 | -2.IBPluginDependency 229 | 11.IBPluginDependency 230 | 13.IBPluginDependency 231 | 14.IBPluginDependency 232 | 16.IBPluginDependency 233 | 6.IBPluginDependency 234 | 8.CustomClassName 235 | 8.IBPluginDependency 236 | 237 | 238 | YES 239 | GCPlaceholderTextViewDemoViewController 240 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 241 | UIResponder 242 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 243 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 244 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 245 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 246 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 247 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 248 | GCPlaceholderTextView 249 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 250 | 251 | 252 | 253 | YES 254 | 255 | 256 | 257 | 258 | 259 | YES 260 | 261 | 262 | 263 | 264 | 17 265 | 266 | 267 | 0 268 | IBCocoaTouchFramework 269 | 270 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 271 | 272 | 273 | YES 274 | 3 275 | 2083 276 | 277 | 278 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/en.lproj/MainWindow.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1024 5 | 10D571 6 | 786 7 | 1038.29 8 | 460.00 9 | 10 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 11 | 112 12 | 13 | 14 | YES 15 | 16 | 17 | 18 | YES 19 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 20 | 21 | 22 | YES 23 | 24 | YES 25 | 26 | 27 | YES 28 | 29 | 30 | 31 | YES 32 | 33 | IBFilesOwner 34 | IBCocoaTouchFramework 35 | 36 | 37 | IBFirstResponder 38 | IBCocoaTouchFramework 39 | 40 | 41 | IBCocoaTouchFramework 42 | 43 | 44 | GCPlaceholderTextViewDemoViewController 45 | 46 | 47 | 1 48 | 49 | IBCocoaTouchFramework 50 | NO 51 | 52 | 53 | 54 | 292 55 | {320, 480} 56 | 57 | 1 58 | MSAxIDEAA 59 | 60 | NO 61 | NO 62 | 63 | IBCocoaTouchFramework 64 | YES 65 | 66 | 67 | 68 | 69 | YES 70 | 71 | 72 | delegate 73 | 74 | 75 | 76 | 4 77 | 78 | 79 | 80 | viewController 81 | 82 | 83 | 84 | 11 85 | 86 | 87 | 88 | window 89 | 90 | 91 | 92 | 14 93 | 94 | 95 | 96 | 97 | YES 98 | 99 | 0 100 | 101 | 102 | 103 | 104 | 105 | -1 106 | 107 | 108 | File's Owner 109 | 110 | 111 | 3 112 | 113 | 114 | GCPlaceholderTextViewDemo App Delegate 115 | 116 | 117 | -2 118 | 119 | 120 | 121 | 122 | 10 123 | 124 | 125 | 126 | 127 | 12 128 | 129 | 130 | 131 | 132 | 133 | 134 | YES 135 | 136 | YES 137 | -1.CustomClassName 138 | -2.CustomClassName 139 | 10.CustomClassName 140 | 10.IBEditorWindowLastContentRect 141 | 10.IBPluginDependency 142 | 12.IBEditorWindowLastContentRect 143 | 12.IBPluginDependency 144 | 3.CustomClassName 145 | 3.IBPluginDependency 146 | 147 | 148 | YES 149 | UIApplication 150 | UIResponder 151 | GCPlaceholderTextViewDemoViewController 152 | {{234, 376}, {320, 480}} 153 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 154 | {{525, 346}, {320, 480}} 155 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 156 | GCPlaceholderTextViewDemoAppDelegate 157 | com.apple.InterfaceBuilder.IBCocoaTouchPlugin 158 | 159 | 160 | 161 | YES 162 | 163 | 164 | YES 165 | 166 | 167 | 168 | 169 | YES 170 | 171 | 172 | YES 173 | 174 | 175 | 176 | 15 177 | 178 | 179 | 180 | YES 181 | 182 | UIWindow 183 | UIView 184 | 185 | IBUserSource 186 | 187 | 188 | 189 | 190 | GCPlaceholderTextViewDemoAppDelegate 191 | NSObject 192 | 193 | YES 194 | 195 | YES 196 | viewController 197 | window 198 | 199 | 200 | YES 201 | GCPlaceholderTextViewDemoViewController 202 | UIWindow 203 | 204 | 205 | 206 | YES 207 | 208 | YES 209 | viewController 210 | window 211 | 212 | 213 | YES 214 | 215 | viewController 216 | GCPlaceholderTextViewDemoViewController 217 | 218 | 219 | window 220 | UIWindow 221 | 222 | 223 | 224 | 225 | IBProjectSource 226 | GCPlaceholderTextViewDemoAppDelegate.h 227 | 228 | 229 | 230 | GCPlaceholderTextViewDemoAppDelegate 231 | NSObject 232 | 233 | IBUserSource 234 | 235 | 236 | 237 | 238 | GCPlaceholderTextViewDemoViewController 239 | UIViewController 240 | 241 | IBProjectSource 242 | GCPlaceholderTextViewDemoViewController.h 243 | 244 | 245 | 246 | 247 | YES 248 | 249 | NSObject 250 | 251 | IBFrameworkSource 252 | Foundation.framework/Headers/NSError.h 253 | 254 | 255 | 256 | NSObject 257 | 258 | IBFrameworkSource 259 | Foundation.framework/Headers/NSFileManager.h 260 | 261 | 262 | 263 | NSObject 264 | 265 | IBFrameworkSource 266 | Foundation.framework/Headers/NSKeyValueCoding.h 267 | 268 | 269 | 270 | NSObject 271 | 272 | IBFrameworkSource 273 | Foundation.framework/Headers/NSKeyValueObserving.h 274 | 275 | 276 | 277 | NSObject 278 | 279 | IBFrameworkSource 280 | Foundation.framework/Headers/NSKeyedArchiver.h 281 | 282 | 283 | 284 | NSObject 285 | 286 | IBFrameworkSource 287 | Foundation.framework/Headers/NSObject.h 288 | 289 | 290 | 291 | NSObject 292 | 293 | IBFrameworkSource 294 | Foundation.framework/Headers/NSRunLoop.h 295 | 296 | 297 | 298 | NSObject 299 | 300 | IBFrameworkSource 301 | Foundation.framework/Headers/NSThread.h 302 | 303 | 304 | 305 | NSObject 306 | 307 | IBFrameworkSource 308 | Foundation.framework/Headers/NSURL.h 309 | 310 | 311 | 312 | NSObject 313 | 314 | IBFrameworkSource 315 | Foundation.framework/Headers/NSURLConnection.h 316 | 317 | 318 | 319 | NSObject 320 | 321 | IBFrameworkSource 322 | UIKit.framework/Headers/UIAccessibility.h 323 | 324 | 325 | 326 | NSObject 327 | 328 | IBFrameworkSource 329 | UIKit.framework/Headers/UINibLoading.h 330 | 331 | 332 | 333 | NSObject 334 | 335 | IBFrameworkSource 336 | UIKit.framework/Headers/UIResponder.h 337 | 338 | 339 | 340 | UIApplication 341 | UIResponder 342 | 343 | IBFrameworkSource 344 | UIKit.framework/Headers/UIApplication.h 345 | 346 | 347 | 348 | UIResponder 349 | NSObject 350 | 351 | 352 | 353 | UISearchBar 354 | UIView 355 | 356 | IBFrameworkSource 357 | UIKit.framework/Headers/UISearchBar.h 358 | 359 | 360 | 361 | UISearchDisplayController 362 | NSObject 363 | 364 | IBFrameworkSource 365 | UIKit.framework/Headers/UISearchDisplayController.h 366 | 367 | 368 | 369 | UIView 370 | 371 | IBFrameworkSource 372 | UIKit.framework/Headers/UITextField.h 373 | 374 | 375 | 376 | UIView 377 | UIResponder 378 | 379 | IBFrameworkSource 380 | UIKit.framework/Headers/UIView.h 381 | 382 | 383 | 384 | UIViewController 385 | 386 | IBFrameworkSource 387 | UIKit.framework/Headers/UINavigationController.h 388 | 389 | 390 | 391 | UIViewController 392 | 393 | IBFrameworkSource 394 | UIKit.framework/Headers/UIPopoverController.h 395 | 396 | 397 | 398 | UIViewController 399 | 400 | IBFrameworkSource 401 | UIKit.framework/Headers/UISplitViewController.h 402 | 403 | 404 | 405 | UIViewController 406 | 407 | IBFrameworkSource 408 | UIKit.framework/Headers/UITabBarController.h 409 | 410 | 411 | 412 | UIViewController 413 | UIResponder 414 | 415 | IBFrameworkSource 416 | UIKit.framework/Headers/UIViewController.h 417 | 418 | 419 | 420 | UIWindow 421 | UIView 422 | 423 | IBFrameworkSource 424 | UIKit.framework/Headers/UIWindow.h 425 | 426 | 427 | 428 | 429 | 0 430 | IBCocoaTouchFramework 431 | 432 | com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS 433 | 434 | 435 | 436 | com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 437 | 438 | 439 | YES 440 | GCPlaceholderTextViewDemo.xcodeproj 441 | 3 442 | 112 443 | 444 | 445 | -------------------------------------------------------------------------------- /Demo/GCPlaceholderTextViewDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // GCPlaceholderTextViewDemo 4 | // 5 | // Created by Guillaume Campagna on 11-04-22. 6 | // Copyright 2011 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) 12 | { 13 | @autoreleasepool { 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | return retVal; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /GCPlaceholderTextView/GCPlaceholderTextView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextView.h 3 | // GCLibrary 4 | // 5 | // Created by Guillaume Campagna on 10-11-16. 6 | // Copyright 2010 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface GCPlaceholderTextView : UITextView 13 | 14 | @property(nonatomic, strong) NSString *placeholder; 15 | 16 | @property (nonatomic, strong) UIColor *realTextColor UI_APPEARANCE_SELECTOR; 17 | @property (nonatomic, strong) UIColor *placeholderColor UI_APPEARANCE_SELECTOR; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /GCPlaceholderTextView/GCPlaceholderTextView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GCPlaceholderTextView.m 3 | // GCLibrary 4 | // 5 | // Created by Guillaume Campagna on 10-11-16. 6 | // Copyright 2010 LittleKiwi. All rights reserved. 7 | // 8 | 9 | #import "GCPlaceholderTextView.h" 10 | 11 | @interface GCPlaceholderTextView () 12 | 13 | @property (unsafe_unretained, nonatomic, readonly) NSString* realText; 14 | 15 | - (void) beginEditing:(NSNotification*) notification; 16 | - (void) endEditing:(NSNotification*) notification; 17 | 18 | @end 19 | 20 | @implementation GCPlaceholderTextView 21 | 22 | @synthesize realTextColor; 23 | @synthesize placeholder; 24 | @synthesize placeholderColor; 25 | 26 | #pragma mark - 27 | #pragma mark Initialisation 28 | 29 | - (id) initWithFrame:(CGRect)frame { 30 | if ((self = [super initWithFrame:frame])) { 31 | [self awakeFromNib]; 32 | } 33 | return self; 34 | } 35 | 36 | - (void)awakeFromNib { 37 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(beginEditing:) name:UITextViewTextDidBeginEditingNotification object:self]; 38 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(endEditing:) name:UITextViewTextDidEndEditingNotification object:self]; 39 | 40 | self.realTextColor = self.textColor; 41 | self.placeholderColor = [UIColor lightGrayColor]; 42 | } 43 | 44 | #pragma mark - 45 | #pragma mark Setter/Getters 46 | 47 | - (void) setPlaceholder:(NSString *)aPlaceholder { 48 | if ([self.realText isEqualToString:placeholder] && ![self isFirstResponder]) { 49 | self.text = aPlaceholder; 50 | } 51 | if (aPlaceholder != placeholder) { 52 | placeholder = aPlaceholder; 53 | } 54 | 55 | 56 | [self endEditing:nil]; 57 | } 58 | 59 | - (void)setPlaceholderColor:(UIColor *)aPlaceholderColor { 60 | placeholderColor = aPlaceholderColor; 61 | 62 | if ([super.text isEqualToString:self.placeholder]) { 63 | self.textColor = self.placeholderColor; 64 | } 65 | } 66 | 67 | - (NSString *) text { 68 | NSString* text = [super text]; 69 | if ([text isEqualToString:self.placeholder]) return @""; 70 | return text; 71 | } 72 | 73 | - (void) setText:(NSString *)text { 74 | if (([text isEqualToString:@""] || text == nil) && ![self isFirstResponder]) { 75 | super.text = self.placeholder; 76 | } 77 | else { 78 | super.text = text; 79 | } 80 | 81 | if ([text isEqualToString:self.placeholder] || text == nil) { 82 | self.textColor = self.placeholderColor; 83 | } 84 | else { 85 | self.textColor = self.realTextColor; 86 | } 87 | } 88 | 89 | - (NSString *) realText { 90 | return [super text]; 91 | } 92 | 93 | - (void) beginEditing:(NSNotification*) notification { 94 | if ([self.realText isEqualToString:self.placeholder]) { 95 | super.text = nil; 96 | self.textColor = self.realTextColor; 97 | } 98 | } 99 | 100 | - (void) endEditing:(NSNotification*) notification { 101 | if ([self.realText isEqualToString:@""] || self.realText == nil) { 102 | super.text = self.placeholder; 103 | self.textColor = self.placeholderColor; 104 | } 105 | } 106 | 107 | - (void) setTextColor:(UIColor *)textColor { 108 | if ([self.realText isEqualToString:self.placeholder]) { 109 | if ([textColor isEqual:self.placeholderColor]){ 110 | [super setTextColor:textColor]; 111 | } else { 112 | self.realTextColor = textColor; 113 | } 114 | } 115 | else { 116 | self.realTextColor = textColor; 117 | [super setTextColor:textColor]; 118 | } 119 | } 120 | 121 | #pragma mark - 122 | #pragma mark Dealloc 123 | 124 | - (void)dealloc { 125 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 126 | 127 | } 128 | 129 | @end 130 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | This control is dual licensed: 2 | 3 | You can use it for free under the MIT licence below or, if you require non-attribution you can purchase the commercial licence available at http://www.cocoacontrols.com/authors/gcamp 4 | 5 | --- 6 | 7 | Copyright (c) 2011 Guillaume Campagna 8 | 9 | Permission is hereby granted, free of charge, to any person 10 | obtaining a copy of this software and associated documentation 11 | files (the "Software"), to deal in the Software without 12 | restriction, including without limitation the rights to use, 13 | copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the 15 | Software is furnished to do so, subject to the following 16 | conditions: 17 | 18 | The above copyright notice and this permission notice shall be 19 | included in all copies or substantial portions of the Software. 20 | 21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 22 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 23 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 24 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 25 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 26 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 27 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 28 | OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.textile: -------------------------------------------------------------------------------- 1 | h1. GCPlaceholderTextView 2 | 3 | @GCPlaceholderTextView@ is a subclass of @UITextView@ that add a placeholder property. 4 | 5 | You use it like a normal @UITextView@ and can set the placeholder at any moment. The placeholder property has the same effect as the @UITextField@ 's placeholder. 6 | 7 | A demo project is included. --------------------------------------------------------------------------------