-
I have the coredata showing in text fields the data stored
in view didload: tfEmail.text = editEmp.email; -
the message composer works as well, but if I want to use the email data to include in my message, I get the trouble…
NSArray *toRecipients = [NSArray arrayWithObject:@"employee@example.com"]; [picker setToRecipients:toRecipients]; -
what I need to do is to include the tfEmail in the NSArray, so if I try
NSArray *toRecipients = [NSArray arrayWithObject:@"%@", tfEmail.text];I will get an error
Too many arguments to function arrayWithObject
How do I fix this?
You are tryig to pass a string to the array initializer but are actually passing in two strings. This line should be changed:
You are passing in two string objects,
@"%@"andtfEmail.text. Try removing the format string, like so:If you wanted to keep the format, wrap those strings as follows: