[英]How can I bundle a Package with another custom Package in Swift 5?
I created a custom Package MyCustomPackage
and would like to mimic the following UIKit
/ SwiftUI
behavior.我创建了一个自定义 Package
MyCustomPackage
并想模仿以下UIKit
/ SwiftUI
行为。
import SwiftUI / UIKit // Already imports Foundation
import Foundation //
import MyCustomPackage // I have to manually import Foundation
How can I achieve my goal of already bundling MyCustomPackage
with Foundation
?如何实现已经将
MyCustomPackage
与Foundation
捆绑在一起的目标?
import Foundation
import MyCustomPackage
class BaseVC: UIViewController {
}
Then, use this BaseVc any where in the project然后,在项目的任何地方使用这个 BaseVc
import UIKit
class LoginVC: BaseVC {
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.