怎么可能有像http://www.nutsaboutmac.com/wp-content/uploads/2012/11/ShareLinktoFacebook.png这样的东西
到目前为止,我已经为我的NavigationBar和BarButtonItem设置了相同的背景图片。问题是按钮不再有边框,你不能再区分NavigationBar和按钮了……
UIImage *image = [UIImage imageNamed:@"facebook_texture.png"];
[cancelButton setBackgroundImage:image forState:UIControlStateNormal style:UIBarButtonItemStyleBordered barMetrics:UIBarMetricsDefault];
[topBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];如何在更改背景的同时保持加边框的样式?
发布于 2013-04-05 07:28:53
您不能设置自定义bg图像。边框是bg图像,它要么是你自己的,要么是系统的。
=>没有办法,只能制作自己的图像
编辑:我认为对于您所描述的,使用tinting:barButton.tintColor=color,并提供一个带有alpha或用colorwithPatternImage制作的图案图像的颜色
但是..。带有清晰颜色或图案的着色不起作用。这是sdk IMO =>中的一个bug,没有办法,只能自己制作图像。
https://stackoverflow.com/questions/15823227
复制相似问题