This one is funky...
I have a controller and a view.
The view contains a single textfield and several NSStrings.
The view will have the user enter the info and will store it in the NSStrings.
The view controller will then create a NSDictionary and send that to the delegate.
Anyway, all of that works fine and just to plan unless you use a space in the text field and in that case it crashes the app.
I tried something like this in the textFieldDidEndEditing:
As well as striping the white spaces just as a temporary fix until I can get past the spaces problem overall. But neither worked.
Any ideas?
I have a controller and a view.
The view contains a single textfield and several NSStrings.
The view will have the user enter the info and will store it in the NSStrings.
The view controller will then create a NSDictionary and send that to the delegate.
Anyway, all of that works fine and just to plan unless you use a space in the text field and in that case it crashes the app.
I tried something like this in the textFieldDidEndEditing:
Code:
myFirstNSStringValue = [[textField text] stringByReplacingOccurrencesOfString:@" " withString:@""];
Any ideas?