Skip to content

Instantly share code, notes, and snippets.

class TextFieldHandler {
var handlers: [UITextField: (String) -> Void] = [:]
func bind(textField: UITextField, handler: @escaping (String) -> Void) {
textField.addTarget(self, action: #selector(textFieldChanged), for: .editingChanged)
self.handlers[textField] = handler
}

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
  Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'

UIActivityIndicatorView

<?php
// Application credentials
DEFINE('APPLICATION_ID', 0); // Set your application ID (integer)
DEFINE('AUTH_KEY', ""); // Set your auth key (string)
DEFINE('AUTH_SECRET', ""); // Set your auth secret (string)
// User credentials
DEFINE('USER_LOGIN', ""); // Set your user login (string)
DEFINE('USER_PASSWORD', ""); // Set your user password (string)
PROJECT=$1
TARGET=$2
if [ "$PROJECT" == '' ] || [ "$TARGET" == '' ]; then
echo "Usage $0 projectDirectory targetDirectory"
exit
fi
if [ ! -d $PROJECT/$TARGET ]; then
echo "$PROJECT/$TARGET does not exist"