I have a problem. I get an error if the objectAtIndex:x is empty. In my code the user has to insert a code separated by “/” like 32/31/43 or even 32//12. Everything works but if the user insert a single number without the “/” I got the error shown in the picture but I would like to get an alert view that tell the user that the code has been inserted in a wrong format. I hope it’s clear. thanks

I have a problem. I get an error if the objectAtIndex:x is empty. In
Share
Probably the best way to go about it is to check your array after you created it to make sure there are 3 values.
EDIT: you will have to edit the title and message to say what you want, but that’s the basic idea on how to check for bad data before the error and how to display a warning. You will have to add your own logic how to handle it with the user