This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public class FontPickerTextField: PickerTextField { | |
public required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
for familyName in UIFont.familyNames() { | |
self.choices.appendContentsOf(UIFont.fontNamesForFamilyName(familyName)) | |
} | |
self.choices = self.choices.sort() | |
self.text = self.choices[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public class ColorPickerTextField: PickerTextField { | |
public var colorChoices = [ | |
UIColor.blackColor(), | |
UIColor.blueColor(), | |
UIColor.brownColor(), | |
UIColor.darkGrayColor(), | |
UIColor.cyanColor(), | |
UIColor.grayColor(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
/** | |
PickerTextField - Use PickerTextField when you want a list of choices in a UIPickerView displayed in place of the key board. | |
- Note: | |
Set it up by setting the choices to an array of strings. These are the strings that will show up in the UIPickerView for the key board. | |
- Note: | |
You can set a block for onSelected for action when something is selected. | |
- Note: | |
The selectedTimeOut property can be set for the amount of time to wait after something is selected before ending the edit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let __kDefaultColorError = UIColor.redColor() | |
let __kDefaultColorSuccess = UIColor.greenColor() | |
let __kDefaultColor = UIColor.whiteColor() | |
let __kDefaultColorBackground = UIColor.blackColor() | |
let __kDefaultFont = UIFont(name: "Menlo-Bold", size: 12.0)! | |
let __kLoggerTextFieldListenerName = "com.webroot.control.LoggerTextField" |
NewerOlder