我不断收到的UIButton类的白色背景,不能只是添加图像透明如何添加图像而不通过Interface Builder获取UIButton类的背景?
回答
设置按钮Type
到Custom
在Interface Builder中应该有所帮助。
+1打我1秒。 – PengOne 2011-06-16 06:35:20
@ user605957这个工作适合你吗? – 2011-06-19 18:07:20
使用UIButtonTypeCustom
并设置backgroundImage
。
从Object Library中,如何添加UIButtonTypeCustom?我将什么元素拖到UIToolBar上? – user605957 2011-06-17 18:46:03
使用'UIButton',然后打开属性检查器。将“Round Rect Button”选项改为“Custom Button”。 – PengOne 2011-06-17 22:08:34
- 1. 获取UIButton的背景图像
- 2. 如何使用Interface Builder在视图中设置背景图像
- 3. UIView的子类。如何通过Interface Builder添加?
- 4. 通过Interface Builder在UITextView中添加'...'
- 5. 如何在XCode Interface Builder中设置UIButton的选定图像
- 6. 如何使用Interface Builder在UIButton或UIBarButtonItem上添加BgImage?
- 7. 图像和背景图像的UIButton
- 8. 动画UIButton背景图像
- 9. 如何子类化UISearchDisplayController中已经通过Interface Builder添加的UITableView?
- 10. 如何添加背景图像与伪
- 11. JQM如何添加背景图像
- 12. 如何添加背景图像到div?
- 13. 通过css添加背景图片
- 14. UIButton图像/背景图像古怪
- 15. 获取应用于按下UIButton背景图像的颜色
- 16. 如何更改UIButton中的UIButton背景图像点击ios
- 17. 在Interface Builder中创建的UIButton的设置图像,代码
- 18. 如何将UIScrollView添加到Interface Builder?
- 19. 如何获取rainyday.js使用CSS背景图像作为背景?
- 20. 访问UIButton的背景图像的UIImageView
- 21. 通过单击事件将背景图像添加到div。
- 22. 通过javascript将背景图像添加到div
- 23. 如何通过CSS在背景上添加图片?
- 24. iphone - Interface Builder不加载自定义类?
- 25. 如何将类添加到div如果背景图像等于特定图像
- 26. 在jButton中添加背景(netbeans gui builder)
- 27. 如何释放UIButton的背景图片?
- 28. 从div中提取图像并添加为背景图像
- 29. 如何通过图像的透明像素显示UIImage背景
- 30. 添加模糊的背景图像
你现在正在做什么? – 2011-06-16 06:12:38
我通过IB创建一个UIButton(Round REct按钮),它具有全白背景。然后我选择图像属性作为我想要的图像。图片显示,但背景是白色和丑陋的。我希望背景是透明的,或只是图像的尺寸。 – user605957 2011-06-16 06:31:53
您可能想要查看对您有帮助的接受(勾选的复选标记)答案。这是支持社区的好方法,谢谢提供有用答案的用户,并鼓励其他用户在将来继续回答您的问题。 – PengOne 2011-06-18 03:37:17