【发布时间】:2012-05-31 07:10:59
【问题描述】:
这是我自定义按钮的当前方式:
UIAlertView *av = [[UIAlertView alloc] init];
[av addButtonWithTitle:@""];
UIButton *yesButton = [av.subviews lastObject];
[av show];
[yesButton setImage:[UIImage imageNamed:@"test.png"] forState:UIControlStateNormal];
这样做的问题是原始视图在我为按钮设置的图像周围仍然可见。它没有完全封装图像。这是我到目前为止的一个例子:
https://www.dropbox.com/s/htb9pfihwmel5oo/testimage.png
有没有办法让图片完全占据整个按钮?
【问题讨论】:
标签: ios uibutton customization uialertview