             self.pinResetButton.setTitleColor(UIColor.yiGrapeColor(), for: UIControlState())
         }
         pinResetButton.layer.cornerRadius = pinResetButton.frame.size.height/2
-        //        pinResetButton.layer.borderWidth = 1
     }
     
     @IBAction func pinResetTapped(_ sender: UIButton) {
         weak var tracker = GAI.sharedInstance().defaultTracker
         tracker!.send(GAIDictionaryBuilder.createEvent(withCategory: "ui_action", action: "pinResetTapped", label: "Reset the pin button pressed", value: nil).build() as! [AnyHashable: Any])
-        
         self.pinResetTapped()
     }
     

    @IBAction func backToSettings(_ sender: AnyObject) {
        weak var tracker = GAI.sharedInstance().defaultTracker
        tracker!.send(GAIDictionaryBuilder.createEvent(withCategory: "ui_action", action: "backToSettings", label: "Back to settings from pinreset", value: nil).build() as! [AnyHashable: Any])
        
        self.navigationController?.dismiss(animated: true, completion: nil)
    }
    
    /** If the user has been deleted on another device then this method will check if the user exists, and if not then it will send the user back to the welcome screen to re-register
     */
    func checkUserExists() {
        UserRequestManager.sharedInstance.getUser(GetUserRequest.allowed){ (success, message, code, user) in
            if code == YonaConstants.serverCodes.errorUserNotFound {
                Loader.Hide()
                if let serverMessage = message {
                    self.displayAlertOption("", cancelButton: true, alertDescription: serverMessage, onCompletion: { (buttonPressed) in
                        switch buttonPressed{
                        case alertButtonType.ok:
                             let welcome = R.storyboard.welcome.welcomeViewController(())
                                self.view.window?.rootViewController?.dismiss(animated: false, completion:nil)
                             self.view.window?.rootViewController?.present(welcome!, animated: false, completion: nil)
                            
                        case alertButtonType.cancel:
                            break
                        }
                    })
                }
            } else {
                if UserDefaults.standard.bool(forKey: YonaConstants.nsUserDefaultsKeys.isBlocked) == false {
                    self.codeInputView.becomeFirstResponder()
                }
            }
        }
    }
}


            var aRect = self.view.bounds
            aRect.origin.x = 64
            aRect.size.height -= 64
            aRect.size.height -= keyboardSize.size.height
            if (!aRect.contains(activeField.frame.origin)) {
                var frameToScrollTo = activeField.frame
