Hi I have NSarray
values in Xcode. I need to get array indexOfObject by comparing string values.
my array values are
(
{
firstName = lord;
lastname = krishna;
},
{
firstName = priya;
lastname = amirtha;
}
)
If I type first name in textfield and click button means last name want to display in another textfield.
thank you.
To answer the title of your question:
I think that using an NSDictionary would be better for you though. Then you can simply keep the first and last names as Key Value pairs.
Then you can just do value for key when you get the first name:
Store firstNameArray and lastNameArray a mutable array
NSMutableArray
.Using
Fast Enumeration
. Suppose array is the array you are provided withAfter entering the data in
firstNameTextField
click the buttonButton action method implementation