【发布时间】:2014-01-27 11:17:12
【问题描述】:
我有 alertview,我有 Yes 和 No 选项。如下所示。
使用的代码是
UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?" delegate:self cancelButtonTitle:@"Yes" otherButtonTitles:@"No", nil];
confAl.tag = 888;
[confAl show];
这很完美,但我希望 Yes 是粗体,No 是普通字体。
所以我切换了是和否按钮,如下所示。
使用的代码是
UIAlertView *confAl = [[UIAlertView alloc] initWithTitle:@"" message:@"Are you sure?" delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
confAl.tag = 888;
[confAl show];
有什么方法可以让我们将“是”作为第一个按钮,将“否”作为第二个按钮,并以“是”作为粗体效果?
注意: 我希望在 iOS 6(相同的旧样式)和 iOS 7(如上图的新样式)中也有相同的效果。
【问题讨论】:
-
@downvoter :有什么问题?我真的很喜欢恨你...
-
@Fahim.. 冷静.. 我投了你的票。不要讨厌那个不赞成的选民..:)
-
@JohnWoods :我不想使用自定义警报视图...我正在尝试使用当前警报视图找到解决方案...可能像 firstButton.title.style = bold 或类似的东西...
标签: ios objective-c button uialertview