I currently add objects to an array with a label taken from the textfield input from the user.
At the moment it adds an entry even if the field is blank.
I assign the textfield to a string and then want to check if it is nil, if it is then dont add it to the array.
I am used to java where it could be done with something like
if(enteredText.length > 0){ //add to array}
I am trying the following in my code now
if(title != nil)
{
[plistArray addObject:title];
[plistArray writeToFile:filepath atomically: YES];
}
but it doesnt seem to work and there are no dot methods available to get the length of the entered text.
How could I achieve this in Obj-C?
Regards