Q:

How can I make a UIButton look like a delete button (iphone/iPad)?

I want to make my UIButton look like this:

How can I achieve this look? Is there a built in setting or will I just have to manually create it in photoshop?

A:

One option is to just use an image for the background, like this one:

There's also a class called GMButton that is found on github.  You can set the title, color, titleColor for each state.  Just use it in place of UIButton (it's a subclass of UIButton).  With it you can create buttons like these or these:

For your Delete button, I would try this:
GMButton* button = [GMButton buttonWithFrame:CGRectMake(18,3,284,34)];

button.titleLabel.font = [UIFont systemFontOfSize:17];

[button setTitle:@"Delete" forState:UIControlStateNormal];
[button setColor:[UIColor redColor] forState:UIControlStateNormal];
[button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];

It uses 3 layers to create the button.  A CAGradientLayer for the bevel, a CALayer for the color, and a CAGradientLayer for the highlighting.

A:

Use a uibutton of type custom, and provide an image for each state.
UIButton *myDeleteButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myDeleteButton setImage:[UIImage imageNamed:@"ic_button_titlebar_delete.png"]    forState:UIControlStateNormal];
[myDeleteButton setImage:[UIImage imageNamed:@"ic_button_titlebar_delete_on.png"] forState:UIControlStateSelected];

So, yes, you'll need to use PhotoShop or some other imaging tool.

