设置alertview Yes按钮大胆和无按钮正常 [英] set alertview Yes button to bold and No button to normal
问题描述
我有alertview在那里我是和否选项。它看起来像下面。
I have alertview where I have Yes and No options. It looks like below.
使用code是
UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil];
confAl.tag = 888;
[confAl show];
这是完美的,但我想是的大胆和不正常的字体。
This is perfect but I want Yes to be bold and No as normal font.
所以我切换是和否按钮,并有像下面。
So I switched the Yes and No button and have like below.
使用code是
UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
confAl.tag = 888;
[confAl show];
有什么办法,我们可以有大胆的影响是有作为第一个按钮,没有为第二个按钮?的
Is there any way where we can have Yes as first button and No as second button with Yes as bold effect?
注意: 我想在iOS 6中(同老款)及相同的效果;适用于iOS 7(图像如上新的风格)了。的
推荐答案
您的要求就是要突出显示是按钮。在iOS的7默认取消按钮是被突显。不幸的是,你不能简单地改变这里alertViewStyle。但是你有一个解决办法。
Your requirement is to "Highlight" Yes button.. In iOS 7 by default cancel button is the one which is highlighted. Unfortunately you can't simply change alertViewStyle here. But you do have a workaround.
看这个答案。
这篇关于设置alertview Yes按钮大胆和无按钮正常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!