ios - NSBundles 中的类

标签 ios objective-c iphone dynamic-linking nsbundle

NSBundle 最常见的用途似乎是保存 nib 文件和此类文件。但从我读到的内容来看,我似乎也可以捆绑类,但我找不到任何如何实现这一目标的示例。您能否提供一个示例,如果是,您能否告诉我 Apple 是否会禁止将此类的方法动态加载到现有类中?

最佳答案

在 iOS 中确实禁止动态加载框架包。请参阅以下链接以获取相关文档:

https://developer.apple.com/library/ios/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW28

Note: The creation and use of loadable bundles is not supported in iOS.

关于ios - NSBundles 中的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28465400/

相关文章:

ios - Firebase 获取数据

ios - 来自主机应用程序的 Swift 数据到今天的小部件

ios - 让我知道这段代码的功能

iphone - 检查预编译时是否链接了框架

ios - ios mvc模式中的http请求

ios - 如何使文本能够在 ionic 应用程序中复制

ios - 如何在IOS上浏览和列出经典蓝牙设备?

ios - '-[AVPlayer super View ] : unrecognized selector sent to instance 0x21011ad0'

iphone - 无法从相关的 View Controller 访问 appdelegate 实例变量

iphone - View 的框架和 View 的绑定(bind)之间的区别 + iPhone