iOS Developer Library

Developer

UIKit Framework Reference UIInputViewAudioFeedback Protocol Reference

Options
Deployment Target:

On This Page
Language:

UIInputViewAudioFeedback

The UIInputViewAudioFeedback protocol defines a single property for enabling a custom input or keyboard accessory view to play standard keyboard input clicks. More...

Inheritance


Not Applicable

Import Statement


import UIKit @import UIKit;

Availability


Available in iOS 4.2 and later.
  • Specifies whether or not an input view enables input clicks.

    Declaration

    Swift

    optional var enableInputClicksWhenVisible: Bool { get }

    Objective-C

    @property(nonatomic, readonly) BOOL enableInputClicksWhenVisible

    Discussion

    In your custom subclass of UIView, implement this property as a getter method. Return YEStrue to enable input clicks in your custom input or keyboard accessory view, as follows:

    Swift

    • var enableInputClicksWhenVisible: Bool {
    • return true
    • }

    Objective-C

    • - (BOOL) enableInputClicksWhenVisible {
    • return YES;
    • }

    Input clicks will be produced only if the user has also enabled keyboard clicks in Settings > Sounds.

    Import Statement

    import UIKit

    Availability

    Available in iOS 4.2 and later.