Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Sam Soffes May 25, 2012
file 58 lines (43 sloc) 2.016 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
//
// SSTextField.h
// SSToolkit
//
// Created by Sam Soffes on 3/11/10.
// Copyright 2010-2011 Sam Soffes. All rights reserved.
//

/**
Simple UITextField subclass to adds text insets.
*/
@interface SSTextField : UITextField

///------------------------------------
/// @name Accessing the Text Attributes
///------------------------------------

/**
The color of the placeholder text.
This property applies to the entire placeholder text string. The default value for this property is set by the system.
Setting this property to `nil` will use the system placeholder text color.
The default value is `nil`.
*/
@property (nonatomic, strong) UIColor *placeholderTextColor;


///------------------------------
/// @name Drawing and Positioning
///------------------------------

/**
The inset or outset margins for the edges of the text content drawing rectangle.
Use this property to resize and reposition the effective drawing rectangle for the text content. You can specify a
different value for each of the four insets (top, left, bottom, right). A positive value shrinks, or insets, that
edge—moving it closer to the center of the button. A negative value expands, or outsets, that edge. Use the
`UIEdgeInsetsMake` function to construct a value for this property.
The default value is `UIEdgeInsetsZero`.
*/
@property (nonatomic, assign) UIEdgeInsets textEdgeInsets;

/**
The inset or outset margins for the edges of the clear button drawing rectangle.
Use this property to resize and reposition the effective drawing rectangle for the clear button content. You can
specify a different value for each of the four insets (top, left, bottom, right), but only the top and right insets are
respected. A positive value will move the clear button farther away from the top right corner. Use the
`UIEdgeInsetsMake` function to construct a value for this property.
The default value is `UIEdgeInsetsZero`.
*/
@property (nonatomic, assign) UIEdgeInsets clearButtonEdgeInsets;

@end
Something went wrong with that request. Please try again.