Is it possible to have a custom UIButton with an image spanning only half? I assume it will be something like this:
UIButton *someButton = [UIButton buttonWithType:UIButtonTypeCustom];
[someButton setBackgroundImage:[UIImage imageNamed:@"buttonPicture"]];
.
.
.
I want to have a 50x100px button that has only a 50x50px image in the upper half and be transparent in the lower half.
I know how to create a custom button and that’s it. Im just shaking that property that controls the stretching of the backgroundImage.
Thank!
source
share