use*_*er_ 7 cocoa-touch deprecated uialertview ios ios8
我有使用UIActionSheet
和的应用程序UIAlertView
.
在iOS8中,Apple的文档和一些网站称它们在iOS8中被弃用.
UIActionSheet文档
重要:在iOS 8中不推荐使用UIActionSheet.(请注意,UIActionSheetDelegate也已弃用.)要在iOS 8及更高版本中创建和管理操作表,请使用UIAlertController和UIAlertControllerStyleActionSheet的preferredStyle.
但是在Xcode 6中,部署目标8.0不会生成使用UIActionSheet
和的警告UIAlertView
.
通常,Xcode会为不推荐使用的API生成警告.
为什么Xcode没有为UIActionSheet
和生成警告UIAlertView
?
这是否意味着Apple实际上并没有弃用这些类?
如果他们实际上弃用它们并且Xcode不生成警告,则非常危险.
在另一个苹果的文档"iOS 8.0中的新功能"中说:
新
UIAlertController
类将替换UIActionSheet
和UIAlertView
类作为在应用程序中显示警报的首选方式.https://developer.apple.com/library/ios/releasenotes/General/WhatsNewIniOS/Articles/iOS8.html
而UIActionSheet
与UIAlertView
未上市的已过时的API上面URL的文档部分.
所以,这意味着文件UIAlertController
是首选的,但UIActionSheet
并UIAlertView
还可以买到在IOS 8.
我应该替换UIActionSheet
和UIAlertView
我的应用程序与新的UIAlertController
班?
或者,我可以继续使用UIActionSheet
和UIAlertView
?
归档时间: |
|
查看次数: |
2850 次 |
最近记录: |