简体   繁体   English

在iOS的Auth0 SDK中加载LazyImage

[英]LazyImage Loading in Auth0 SDK for iOS

I'm a brand new developer to swift, and am trying to understand how to load an image into the Auth0 SDK. 我是一位迅速发展的全新开发人员,正在尝试了解如何将图像加载到Auth0 SDK中。

The documentation describes this: 文档对此进行了描述:

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

However, I'm not sure where to put the image referenced in myimagename? 但是,我不确定将引用的图像放在myimagename中的哪里?

going into the LazyImage struct, it describes: 进入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")
 ```

So do I somehow add this image to Assets, or in a .plist file or just put a JPG in a folder somewhere? 那么,我是否会以某种方式将此图像添加到Assets或.plist文件中,或者只是将JPG放在某个位置的文件夹中?

Thanks 谢谢

If you add the image to the assets folder Images.xcassets it should be able to find it! 如果将图像添加到资产文件夹Images.xcassets则应该可以找到它! Let me know if it works. 让我知道它是否有效。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM