UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(110, 270, 100, 35); // size and position of button
[button setTitle:@"OK" forState:UIControlStateNormal];
[button addTarget:self action:@selector(login:) forControlEvents:UIControlEventTouchUpInside];
button.backgroundColor = [UIColor clearColor];
button.adjustsImageWhenHighlighted = YES;
[button setTitleShadowColor:[UIColor redColor] forState:UIControlStateNormal];
button.titleLabel.shadowOffset = CGSizeMake(2, 0.75);
Title Button with Shadow
iPhone SDK Tips & Tricks
Labels:
iphone SDK