AliSoftware / AliSoftware/Reusable

SPM xibs (Bundle.module)

未关闭
#109 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Swift
星标
3k
派生
231
PR 合并指标
30 天内没有已合并 PR

描述

I just starting using NibReusable for a xib inside a SPM package. after a little trial and error, I realized that the nib's `Bundle` had to be `Bundle.module`, not the default `Bundle(for: self)`. I created a new protocol with a default extension for my use case

```swift
extension NibReusableSPM {
public static var nib: UINib { UINib(nibName: String(describing: self), bundle: Bundle.module) }
}
```

is there a simpler way to do this? or am I doing the right thing already

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。