您好,我正在尝试添加 https://github.com/fxm90/GradientLoadingBar/tree/feature/notch-gradient-loading-bar在我的 Xcode 项目中,但是当我指定
pod 'GradientLoadingBar', :git => 'https://github.com/fxm90/GradientLoadingBar', :branch => 'feature/notch-gradient-loading-bar'
在我的 Podfile 中
不给我下载分支。我也试过 :branch => 'notch-gradient-loading-bar'
,但也没有成功。它下载了一些东西,但不是我需要的分支,我无法实现新功能 NotchGradientLoadingBar
let notchGradientLoadingBar = NotchGradientLoadingBar(height: 6)
给我一个错误Use of unresolved identifier 'NotchGradientLoadingBar'
最佳答案
据我所知,似乎只有一个分支(参见 here 以供引用)。您只需要 checkout 标准分支,然后您就可以使用找到的文档实现 NotchGradientLoadingBar here .
在我的测试中,将主分支添加到您的 Xcode 项目并导入 GradientLoadingBar 后,您应该可以毫无问题地使用 let notchGradientLoadingBar = NotchGradientLoadingBar(height: 6)
。
关于xcode - Podfile 不安装选定的分支,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62341128/