I have 2 images for UIbutton (1 for normal state and 1 for highlited state). When the button is highlited the height of button increases(as per image size) . I want that height of button should increase only from top and not from bottom. I mean it should stretch from top .is it possible ? if yes ,how ?
A:
myButton.contentMode = UIViewContentModeBottom;
The above line of code should tell the button to align your images to the bottom of the bounds. If that does not work, you will have to implement drawRect:
in a subclass of UIButton and draw the image yourself.
drawnonward
2010-04-21 03:43:17