Contents

init(input:modifierFlags:action:)

Creates a key command that matches the specified input.

Declaration

convenience init(input: String, modifierFlags: UIKeyModifierFlags, action: Selector)

Parameters

  • input:

    The keys that a person must press. The string must contain one or more characters corresponding to the keys a person pressed. For a list of special characters that don’t have a textual representation, see Input Strings For Special Keys.

  • modifierFlags:

    The bit mask of modifier keys that a person must press. You can use this parameter to specify which modifier keys (Command, Option, and so on) a person must also press. You may specify more than one modifier key. For a list of possible values, see Uikeymodifierflags.

  • action:

    The action method to execute on the responder object.

Return Value

A newly initialized key command object.

Discussion

After creating a key command object, you can:

See Also

Creating a key command object