Instance Property

imageView

The button’s image view.

Declaration

@property(nonatomic, readonly, strong) UIImageView *imageView;

Discussion

Although this property is read-only, its own properties are read/write. Use these properties to configure the appearance and behavior of the button’s view. For example:

UIButton *button                   = [UIButton buttonWithType: UIButtonTypeSystem];
button.imageView.exclusiveTouch    = YES;

The imageView property returns a value even if the button has not been displayed yet. The value of the property is nil for system buttons.

See Also

Getting the Current State

buttonType

The button type.

currentTitle

The current title that is displayed on the button.

currentAttributedTitle

The current styled title that is displayed on the button.

currentTitleColor

The color used to display the title.

currentTitleShadowColor

The color of the title’s shadow.

currentImage

The current image displayed on the button.

currentBackgroundImage

The current background image displayed on the button.