5
是否有可能有一个自定义UIButton的图像只覆盖了一半? 我想这将是这样的:自定义UIButton图像iOS
UIButton *someButton = [UIButton buttonWithType:UIButtonTypeCustom];
[someButton setBackgroundImage:[UIImage imageNamed:@"buttonPicture"]];
/* Then there must be some property I can set that prevents the button from stretching the image?? */
.
.
.
我想有一个50x100px按钮,只在顶部有半个50x50px图像,并在底部半透明。
我知道如何创建一个自定义按钮和一切。我只是在讨论控制背景图像拉伸的属性。
谢谢!
图像的尺寸和按钮的矩形是否相等/比例? – CodaFi 2012-07-08 06:39:27
更新澄清。谢谢 – bkbeachlabs 2012-07-08 06:41:00