0

我有透明部分的图像背景,我去使用没有
透明部分的按钮,如果可能的话,使用界面生成器

在此处输入图像描述

4

2 回答 2

1
btnImage = [UIImage imageNamed:@"image.png"];
[btn setBackgroundImage:btnImage forState:UIControlStateNormal];
[btn setTitle:@"Title" forState:UIControlStateNormal];

or you can directly set background image from your xib by changing it into custom type.

于 2013-02-21T10:54:55.353 回答
1

By the sounds of it you are possibly using the UIButtonTypeRoundedRect style, but UIButtonTypeCustom may be more suitable. You can change this within Interface Builder's inspector window. still i refer this link http://www.raywenderlich.com/22324/beginning-uicollectionview-in-ios-6-part-12

于 2013-02-21T11:09:01.117 回答