ios - AWS Auth UI 登录 - 键盘错误

标签 ios swift amazon-web-services aws-sdk aws-mobilehub

在 AWS Auth UI 中,当我单击用户名文本字段时,它会将字段移出 View 。这在 Plus 和常规尺寸的设备上都会发生。我正在使用 XCode 9.3 和 Swift 4.1。

这是我下面调用 AWSAuthUIViewController 的代码。

    if !AWSSignInManager.sharedInstance().isLoggedIn {
        let config = AWSAuthUIConfiguration()
        config.enableUserPoolsUI = true
        config.backgroundColor = .black
        config.isBackgroundColorFullScreen = true
        config.logoImage = #imageLiteral(resourceName: "LogoBlack")
        config.canCancel = true

        AWSAuthUIViewController.presentViewController(with: self.navigationController!,
                                                      configuration: config,
                                                      completionHandler: { (provider: AWSSignInProvider, error: Error?) in
                                                        if error != nil {
                                                            print("Error occurred: \(error)")
                                                        } else {
                                                            self.onSignIn()
                                                        }
        })

您可以在 https://imgur.com/a/DFxHG 查看错误的图像- iPhone 8 Plus 模拟器。

最佳答案

这个问题似乎出现在最新版本的 AWS iOS Swift pod 中。如果您查看 AWSSignInViewController.m 从 2.6.13 到 2.6.14 的差异 here ,您会看到已经添加了用于处理软件键盘的隐藏/显示事件的代码。

TL;DR 只需为所有 AWS pod 指定版本 2.6.13,直到 Amazon 在以后的版本中解决他们的 UI 问题,如下所示:

pod 'AWSAuthCore', '2.6.13'
pod 'AWSUserPoolsSignIn', '2.6.13'
pod 'AWSAuthUI', '2.6.13'
pod 'AWSPinpoint', '2.6.13'
pod 'AWSCognito', '2.6.13'
pod 'AWSAPIGateway', '2.6.13'
pod 'AWSCognitoIdentityProvider', '2.6.13'
pod 'AWSS3', '2.6.13'
...

编辑: 这已被验证在 2.6.17

中得到解决

关于ios - AWS Auth UI 登录 - 键盘错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49705820/

相关文章:

ios - CoreData 运行缓慢,因为有很多对象。我该如何优化它?

ios - 如何在捆绑设置中查看 slider 值,iOS?

ios - 如何通过应用程序打开 iCloud 设置

ios - 如何快速将 int(枚举)装箱到对象?

amazon-web-services - 无法复制 Elasticache 备份

ios - AIR for iOS垃圾回收

ios - 在 Swift 中以编程方式将 UIImageView 替换为 PDFView

ios - 将框架添加到 Swift 项目

scala - 使用 spark 和 scala 将文件写入 S3 非常慢。有什么更好的方法来优化它?

php - 如何将 SSH 隧道反向到 Xdebug 的远程 docker 容器?