From 4b098fba6f64150d633374b12e5acd0a8d973c6f Mon Sep 17 00:00:00 2001
From: Alireza <mr.toghyiani@icloud.com>
Date: Wed, 25 Oct 2023 16:24:14 -0400
Subject: [PATCH] fix link device form UI issue

Change-Id: I6615e6f9abf3aeb518882d42c7b4a281d3e8ef9d
---
 .../LinkDevice/LinkDeviceViewController.swift          | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift
index 4f73b8ebd..16871828f 100644
--- a/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift
+++ b/Ring/Ring/Features/Walkthrough/LinkDevice/LinkDeviceViewController.swift
@@ -54,16 +54,15 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase
     // MARK: functions
     override func viewDidLoad() {
         super.viewDidLoad()
-        setupUI()
         // Style
-        self.pinTextField.becomeFirstResponder()
-        self.view.layoutIfNeeded()
         linkButton.titleLabel?.ajustToTextSize()
 
         adaptToSystemColor()
         configurePasswordField()
 
         self.applyL10n()
+        setupUI()
+        self.pinTextField.becomeFirstResponder()
 
         // bind view model to view
 
@@ -142,7 +141,10 @@ class LinkDeviceViewController: UIViewController, StoryboardBased, ViewModelBase
             contentView.removeCorners()
             view.backgroundColor = .secondarySystemBackground
         } else {
-            contentView.roundTopCorners(radius: 12)
+            DispatchQueue.main.async { [weak self] in
+                guard let self else { return }
+                self.contentView.roundTopCorners(radius: 12)
+            }
             view.backgroundColor = .clear
         }
 
-- 
GitLab