我正在尝试创建一个具有 3 个选项且没有“取消”按钮的 UIAlertView,但是当我这样做时,它总是将“按钮 3”样式设置为取消按钮。有什么办法可以避免这种情况吗?
UIAlertView *alertView= [[UIAlertView alloc] initWithTitle:@"Select One" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:@"Button 1",@"Button 2", @"Button3", nil];
我做了不同的事情,通过cancelButtonTitle
论证为nil
.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title"
message:@"Message here"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"OK", nil];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)