UIInputView Class Reference

Inherits from
Conforms to
Framework
/System/Library/Frameworks/UIKit.framework
Availability
Available in iOS 7.0 and later.
Declared in
UIInputView.h

Overview

The UIInputView class is designed to match the appearance of the standard system keyboard when used as an input view with a responder. When defining your own custom input views or input accessory views, you can use a UIInputView object as the root view and add any subviews you want to create your input view. The input view and its subviews receive tinting and blur effects based on the options you specify at initialization time.

Tasks

Initializing an Input View

Getting the Input Style

Properties

inputViewStyle

The style applied to the content of the view. (read-only)

@property (nonatomic, readonly) UIInputViewStyle inputViewStyle
Discussion

The style applies both to the current view and to any subviews that adopt the UIAppearance protocol, which includes all standard system views.

Availability
  • Available in iOS 7.0 and later.
Declared In
UIInputView.h

Instance Methods

initWithFrame:inputViewStyle:

Initializes and returns an input view using the specified style information.

- (id)initWithFrame:(CGRect)frame inputViewStyle:(UIInputViewStyle)inputViewStyle
Parameters
frame

The frame rectangle for the view, measured in points. The origin of the frame is relative to the superview in which you plan to add it.

inputViewStyle

The style to use when altering the appearance of the view and its subviews. For a list of possible values, see “UIInputViewStyle”

Return Value

An initialized view object or nil if the view could not be initialized.

Discussion

This method is the designated initializer for the view and must be called by your subclass at initialization time.

Availability
  • Available in iOS 7.0 and later.
Declared In
UIInputView.h

Constants

UIInputViewStyle

Constants that indicate the appearance changes to make to an input view.

typedef enum : NSInteger {
   UIInputViewStyleDefault,
   UIInputViewStyleKeyboard,
} UIInputViewStyle;
Constants
UIInputViewStyleDefault

Apply blur behaviors to the view so that it looks like it belongs with the keyboard. Do not apply tinting effects. This style is intended for input views that attach to the top of the keyboard and have a similar theme but that do not look like the keyboard itself.

Available in iOS 7.0 and later.

Declared in UIInputView.h.

UIInputViewStyleKeyboard

Apply both blur and tinting effects to the view to mimic the keyboard background. This style makes the input view match the keyboard appearance and can be used to replace or extend the keyboard.

Available in iOS 7.0 and later.

Declared in UIInputView.h.