HomeiOS Developmentios - Cursor doesn't seem on preliminary click on in UITextField -...

ios – Cursor doesn’t seem on preliminary click on in UITextField – Swift


I’ve a customized cell with 3 UITextFields. They’re all arrange the identical approach simply with alternative ways. 2/3 work completely, the cursor reveals on preliminary click on and the keyboard pops up. The tough one (weightTextField) doesn’t work as anticipated. The cursor doesn’t present on preliminary click on, however the keyboard does pop up, and the cursor seems as quickly because the person varieties the primary character.
[Storyboard Setup for Custom Cell]

 
   var currentWorkoutSet: WorkoutSet!
   
   @IBOutlet weak var setNumLabel: UILabel!
   @IBOutlet weak var repsTextField: UITextField!
   @IBOutlet weak var weightTextField: UITextField!
   @IBOutlet weak var rpeTextField: UITextField!
   
   static let identifier = "WorkoutViewCell"
   
   static func nib() -> UINib {
      return UINib(nibName: "WorkoutViewCell", bundle: nil)
   }
   
   
   override func awakeFromNib() {
      tremendous.awakeFromNib()
      
      // Initialization code
      if let merchandise = currentWorkoutSet {
         merchandise.reps = 0
         merchandise.weight = 0.0
         merchandise.rpe = 0.0
      }
      initTextFields()
   }
   
   func initTextFields() {
      repsTextField.keyboardType = UIKeyboardType.decimalPad
      weightTextField.keyboardType = UIKeyboardType.decimalPad
      rpeTextField.keyboardType = UIKeyboardType.decimalPad
      
   }

I’ve tried resetting the connection between the textual content fields, checking the setup between the three, checking the settings within the storyboard for the textual content fields, and studying the docs for textFields and cursor.
I would really like a pair extra issues to strive or a technique to manually present the cursor when the person clicks on the textField.
Any assistance is appreciated.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments