ios - LazyImage 在 Auth0 SDK for iOS 中加载

标签 ios swift xcode auth0

我是一名全新的 swift 开发人员,正在尝试了解如何将图像加载到 Auth0 SDK 中。

documentation描述这个:

        return Lock
            .classic()
            .withStyle {
                $0.logo = LazyImage(name: "myimagename")

但是,我不确定将 myimagename 中引用的图像放在哪里?

进入 LazyImage 结构,它描述了:

 Creates a LazyImage with a name and an optional Bundle.
 For images outside Lock's bundle you should specify the Bundle like

 ```
 let image = LazyImage(name: "image_name")
 ```

那么我是以某种方式将此图像添加到 Assets 中,还是添加到 .plist 文件中,或者只是将 JPG 放在某个文件夹中?

谢谢

最佳答案

如果您将图像添加到 Assets 文件夹 Images.xcassets,它应该能够找到它!让我知道它是否有效。

关于ios - LazyImage 在 Auth0 SDK for iOS 中加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50505937/

相关文章:

ios - GCD dispatch_async 是否等待 NSLog()?

ios - 逗号分隔的动态参数的 RestKit 路径模式

ios - 在查询中合并两个解析表

ios - 在 Sprite Kit 中暂停某些 Action

iphone - 当我初始化自定义单元格时返回 'self' 而它没有设置为 '[(super or self) init...]' 的结果

iphone - WebSocket 在 Objective-C 中的使用示例

ios - 如何为自定义单元设置拐角半径

ios - masksToBounds 与 clipsToBounds

swift - 从 Firebase 存储中删除包含内容的文件夹

arrays - 如何从 firebase 中的数组中的项目之前删除 "snap"