Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法以编程方式隐藏 UIAlertView。我正在显示一个进度视图,当进度视图 = 1.0 时,我想隐藏 UIAlertView。
您可以做的是观察(使用键值观察)progress进度视图中的属性,然后当它达到 1.0 时将dismissWithClickedButtonIndex:animated:消息发送到警报视图。
progress
dismissWithClickedButtonIndex:animated:
我会使用 UIActionSheet 来做这种行为。用户接受过手动关闭 UIAlertView 的培训,这只会让他们感到困惑。
UIActionSheets 是高度可定制的,可以做任何你需要的事情。