xcode 在 iOS6 上运行时 UIButton 背景颜色变为白色

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21325368/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:35:21  来源:igfitidea点击:

UIButton background color becomes white when running on iOS6

iosxcodeuibutton

提问by K Hsueh

I wonder why the buttons of my iPhone app is not displaying properly when running on an iOS 6 device. I have set the buttons' background color to a blue color in Interface builder. However, when running on iOS 6 the buttons background became white.

我想知道为什么我的 iPhone 应用程序的按钮在 iOS 6 设备上运行时无法正确显示。我已在界面构建器中将按钮的背景颜色设置为蓝色。但是,在 iOS 6 上运行时,按钮背景变为白色。

This is how the button look like when running on iOS7

这是在 iOS7 上运行时按钮的样子

enter image description here

在此处输入图片说明

And this is how the buttons look like when running on iOS6

这就是在 iOS6 上运行时按钮的样子

enter image description here

在此处输入图片说明

回答by ???

enter image description here

在此处输入图片说明

Make your button Custominstead or Systemor RoundRect

Custom改为制作您的按钮SystemRoundRect

回答by Vaisakh

Change the button type to custom button in Interface builder.

在界面构建器中将按钮类型更改为自定义按钮。