我创建了一个UIViewController
(TestViewController.swift),我在 a 中创建了它,Test.xcodeproj
并希望TestViewController.swift
在另一个abc.xcodeproj
.
例子 -
import Test
class abcViewController: TestViewController {
}
我已经在我的项目的 Pod 文件中添加了abc.xcodeproj
和Test.xcodeproj
。
但是我无法在abcViewController
. 我想使用乐高模式创建我的项目。
请建议什么应该是正确的方法。
很有可能TestViewController
被标记internal
为这是默认值。这可以防止它被其他模块看到,在使用 CocoaPods 时就是这种情况。
要纠正此问题,需要将 TestViewController 标记为public
或open
。
以下Apple 文档涵盖了访问级别,以防您不熟悉此内容并希望了解 public 和 open 之间的区别。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句