Questions tagged [uitextfielddelegate]

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class.

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class. On UITextFieldDelegate, you can find the following methods:

Managing Editing

– textFieldShouldBeginEditing:

– textFieldDidBeginEditing:

– textFieldShouldEndEditing:

– textFieldDidEndEditing:

Editing the Text Field’s Text

– textField:shouldChangeCharactersInRange:replacementString:

– textFieldShouldClear:

– textFieldShouldReturn:

574 questions
-1
votes
1 answer

How to add data to a MutableArray after filtering data from the webservice in iOS

I'm getting data from SOAP webservice. then add those data into a mutable array.this is my code of soap message SoapMessage = [NSString stringWithFormat:@"\n" "
Jobs
  • 269
  • 2
  • 6
  • 21
-1
votes
1 answer

UITextFieldDelegate in containing View Controller

I have implemented a container view in my UIViewController then placed a UITableViewController within it. This table contains static rows that contain a couple UITextFields. Now I have would like to detect when the user presses the return key on the…
Jordan H
  • 52,571
  • 37
  • 201
  • 351
-1
votes
1 answer

Need to check realtime input in my UITextField

I have a signUpViewController that allows users to sign up with a username & password. I need to be able to check in real time the input that the user has added to the usernameTextField I am currently checking it's input by implementing the…
vzm
  • 2,440
  • 6
  • 28
  • 47
-1
votes
1 answer

Save UITextField text that become first responder after inserting new row in tableView

I have implemented the methods to insert new row in tableView while the table is in Editing mode. When i press the cell with the green "plus" icon, a new cell is added above the cell with the green "plus". The new cell contains an empty textField…
EmilDo
  • 1,177
  • 3
  • 16
  • 33
-1
votes
1 answer

Unable to limit characters to only alphanumeric inside UITextField in iOS

In my iOS application, I have a UITextField that presently limits its character entry to 50 characters, and when it receives a single character, it enables a UIButton. What I am trying to do now is ensure that the user can only enter alphanumeric…
syedfa
  • 2,801
  • 1
  • 41
  • 74
-1
votes
1 answer

Need to enable a UIButton after user has entered minimum characters in UITextField using delegate method in iOS

I have an iOS application where I have a UITextField whose maximum character length I set using the delegate method: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString…
syedfa
  • 2,801
  • 1
  • 41
  • 74
-2
votes
1 answer

Textfield deleting newly added characters

I have a label that gets info from the previous view controller as follows @IBOutlet weak var textField: UITextField! var label = String() func textFieldDidBeginEditing(_ textField: UITextField) { self.textField.text =…
Coder221
  • 1,403
  • 2
  • 19
  • 35
-2
votes
2 answers

UITextField shouldChangeCharactersinRange as external function

I want to validate UITextField input for multiple view controllers. The following works: validate.h #import @interface validate : UITextField @end validate.m #import "validate.h" @implementation…
Ancient
  • 73
  • 4
-2
votes
1 answer

How to pass data back to ViewController holding Container View and TableViewController that is embedded in the Container? Swift 3

How can I call func checkField when nextButton is tapped? If no field is empty in ManagedTableEleventhViewController, I'd like to segue to TwelvethViewController. I have a UIViewController ElevethViewController which holds a container view. The…
bibscy
  • 2,598
  • 4
  • 34
  • 82
-2
votes
4 answers

iOS textFieldShouldReturn not running

I've created this in my .h: @interface Class : UIViewController
user2408952
  • 2,011
  • 5
  • 24
  • 26
-2
votes
2 answers

weird error when finish editing UITextField

This is what I get when I press the done button on the keyboard of a UITextField: (code to follow) 2013-10-14 23:22:55.170 What to where?[21627:a0b] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI…
donkey
  • 1,343
  • 13
  • 32
-2
votes
1 answer

I am looking for UITextFieldDelegate sample code

I am looking for UITextFieldDelegate sample code. Please teach when knowing.
marcy
  • 4,213
  • 3
  • 23
  • 14
-3
votes
1 answer

How to format a textfield so when user inputs data its in format similar to 80/150?

Currently there is a textfield that after a user enters data it has to post to a server in a format similar to 60/500, so basically a fraction. I'm familiar with setting up a textfield and connecting it via storyboard along with setting up text…
SwiftyJD
  • 5,257
  • 7
  • 41
  • 92
-4
votes
1 answer

How to achieve currency/ fuel price format (0,00) from left to right in UITextField?

I am currently developing an app where user needs to input fuel price in 0,00 format where after first digit shows comma and it is limited only to input 3 digits. Does anybody have solution?
-4
votes
2 answers

Thread 1: signal SIGABRT swift

I was trying to center the text in the middle of a view, but instead, received an error. Here's my code as a reference. let textbox = UITextField() textbox.text = "Hello" textbox.sizeToFit() textbox.centerXAnchor.constraint(equalTo:…
Claire Cho
  • 87
  • 1
  • 11
1 2 3
38
39