除了它的构造函数 initWithTitle:message:delegate:cancelButtonTitle:otherButtonTitles:
之外,有没有办法为 UIAlertView
的取消按钮设置标题。如果我之前和之后初始化了 UIAlertView
,我想更改取消按钮的标题。
最佳答案
我不知道稍后更改取消按钮文本(我没有看到任何删除/编辑按钮方法),但如果您没有预先指定取消按钮,则可以稍后添加,带有您想要的任何标签,例如
[action setCancelButtonIndex:[action addButtonWithTitle:@"Cancel"]];
关于objective-c - UIAlertView cancelButtonTitle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10168300/