使用(例如)UIWebView
的 subview 是否算作使用未记录的 API?没有文档说明 UIWebView
的第一个 subview 是 UIScrollView
。这是否意味着我不允许向此 UISCrollView
添加子项?
我没有使用任何私有(private)电话,但它没有在任何地方记录。在 iOS 3.1 中,UIWebView
的第一个 subview 是名为 "UIScroller"
的类的实例,它与 UIScrollView
几乎相同,但是没有记录在任何地方。到底什么是允许的?
最佳答案
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/