How to get the input text from the TextField in an alert
<p>This question has been asked before, in:<a href="https://stackoverflow.com/questions/26567413/how-to-get-input-value-from-textfield-in-alert">Get input value from TextField in iOS alert in Swift</a>. However, does somebody have the code in the Objective-C language?</p>

<p>Thanks in advance!</p>

<p>What I've gotten so far:</p>

<pre><code>UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Adding A Row"
    message:@"Enter A Number"
    preferredStyle:UIAlertControllerStyleAlert];

[alert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
    textField.placeholder = @"";
}];

UIAlertAction *cancel = [UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
    [alert dismissViewControllerAnimated:YES completion:nil];
}];

UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
//Do some action here
}];

[alert addAction:cancel];
[alert addAction:ok];

[self presentViewController:alert animated:YES completion:nil];
</code></pre>