Return to Snippet

Revision: 40918
at February 9, 2011 23:08 by BenClayton


Initial Code
UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeCustom];
infoButton.showsTouchWhenHighlighted = YES; // make it flash when touched
[infoButton setImage:[UIImage imageNamed:@"help.png"] forState:UIControlStateNormal];
infoButton.frame = CGRectMake(35, 20, 32, 
[infoButton addTarget:self action:@selector(infoButtonPressed:) forControlEvents:UIControlEventTouchUpInside];    
		  [self addSubview:infoButton];

Initial URL


Initial Description


Initial Title
iPhone: Create custom button that flashes on touch (like the info button)

Initial Tags


Initial Language
Objective C