ios - subview 可以算作在 iOS 中使用未记录的 API 吗?

标签 ios api

使用(例如)UIWebView 的 subview 是否算作使用未记录的 API?没有文档说明 UIWebView 的第一个 subview 是 UIScrollView。这是否意味着我不允许向此 UISCrollView 添加子项?

我没有使用任何私有(private)电话,但它没有在任何地方记录。在 iOS 3.1 中,UIWebView 的第一个 subview 是名为 "UIScroller" 的类的实例,它与 UIScrollView 几乎相同,但是没有记录在任何地方。到底什么是允许的?

最佳答案

来自UIView Class Reference

For complex views declared in UIKit and other system frameworks, any subviews of the view are generally considered private and subject to change at any time. Therefore, you should not attempt to retrieve or modify subviews for these types of system-supplied views. If you do, your code may break during a future system update.

来自App Store Review Guidelines :

Apps that do not use system provided items, such as buttons and icons, correctly and as described in the Apple iOS Human Interface Guidelines may be rejected

总而言之,我读到这些是在说:你可以查看标准组件的 subview ,但如果乱搞它们,后果自负——事情会在没有通知的情况下发生变化,除了你自己,你没有人可以责怪他们打破。此外,如果您确实以不符合 Apple 设计和用户期望的方式修改标准组件,您的应用程序可能会被拒绝。

修改 UIWebView 的私有(private) subview 似乎是一个糟糕的计划。

关于ios - subview 可以算作在 iOS 中使用未记录的 API 吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5416494/

相关文章:

标签模拟器上的 iOS 限制被打破

ios - 在 iOS 上,如何在新线程中检查 View Controller View 中的 UISwitch 值?

api - Instagram API错误: Client request limit reached

android - 如何在 gingerbread 和更低版本的设备上运行 api 级别 14 演示

与 PDFlib API 兼容的 PHP 包装器

javascript - Node.js 中的 JSON.parse 问题

ios - 仅从动态 TableView 的一个单元格推送或继续新 View 的正确方法是什么

iOS:无法在 CallKit 中获取拨出电话事件

android - 如何为仅返回 bool 值的 API 编写 API 调用作为 android 中 retrofit 2 的响应?

python - 为 DeviceCheck 创建 Json 网络 token