UITexturedButton

From iPhone Development Wiki
Revision as of 19:18, 11 October 2009 by KennyTM~ (talk | contribs) (Created page with '{{occlass|library=UIKit.framework}} right|framed|UITexturedButton, in the normal and highlighted states. UITexturedButton is a subclass of [[…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


UITexturedButton, in the normal and highlighted states.

UITexturedButton is a subclass of UIButton which is a button with textured look. Since UITexturedButton is a UIButton, it can be used like a normal UIButton.

The UITexturedButton has a buttonType of 110, although [UIButton buttonWithType:110] will not produce a textured button.

Example code:

UITexturedButton* textureButton = [[UITexturedButton alloc] initWithFrame:CGRectMake(20, 20, 150, 50)];
[textureButton setTitle:@"Textured Button" forState:UIControlStateNormal];	
[myView addSubview:textureButton];
[textureButton release];

Reference