开发者

i want to send the data taken from the database into mailcomposer?

i am sending the data taken from the database into the mail composer.

i have taken the data into a array from database and i have converted it into string but when i am adding the data in to mail composer it is coming in random number .

here is the code that am using to add the array taken from da开发者_开发问答ta base into string and then adding to mail body.

NSString *arr1 =[[appDelegate.list1 UTF8String] componentsJoinedByString:@","];


[picker setMessageBody:arr1  isHTML:NO];

if any one have the answer pls give me.


[[appDelegate.list1 UTF8String] componentsJoinedByString:@","];

What do you want here? If list1 is an array it won't response to -UTF8String, and if it is a string, the method will return a const char* which is not an Objective-C object and thus will crash on -componentsJoinedByString:.

Either use

NSString *arr1 = appDelegate.list1; // if it is a string

or

// if it is an array.
NSString *arr1 = [appDelegate.list1 componentsJoinedByString:@","];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜