0

According to this post, there is a stretchable UIButton image that is red.

Does anyone have a green one? (My Photoshop skills are very poor.)

Community
  • 1
  • 1
Anthony Glyadchenko
  • 3,572
  • 7
  • 48
  • 66

3 Answers3

4

So you want a button with a gradient but you don't want to have to draw the image yourself?

Use a UISegmentedControl, make it bar style, one segment, give it a tint with the color you want and set the size to anything you want. Make its action momentary and start it in an unselected state. All this is doable in Interface Builder. The only difference from a UIButton is that you should connect up the value changed action instead of the touch up inside action.

This is by far the easiest way to do an attractive single button on iPhone/iPad.

Adam Eberbach
  • 12,309
  • 6
  • 62
  • 114
  • 3
    This does not work in iOS 4. So if you want to be an ass, downvote this answer without seeing that it was perfectly valid at the time it was written. Thanks. – Adam Eberbach Mar 17 '11 at 23:18
  • > Use a UISegmentedControl, make it bar style, one segment, [...] All this is doable in Interface Builder. How are you setting it to "1 segment" using IB? The lowest allowed value is "2". – Sally Oct 18 '10 at 14:07
1

U can just play with HUE color property ;-)alt text http://img34.imageshack.us/img34/1962/macscreenshotd.png

0

Bah you don't need photoshop! Use something like Paint.net on Windows or Seashore on OSX. Both are simple capable image editors.

Rob Segal
  • 7,515
  • 12
  • 43
  • 72