NSString *mailString = [NSString stringWithFormat:@\"mailto:?to=%@&subject=%@&body=%@\", [to_s stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], [subject_s stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding], [body_s stringByAddingPercentEscapesUsingEncoding:NSASCIIStringEncoding]]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:mailString]];NOTE: string inabidi iwe properly encoded, kwa mfano kama kuna blanks au spaces kwenye string inabidi irreplasiwe na %20, ndo maana tunatumia the last argument kwenye kucreate mailstring, hii inaforce string iwe properly encoded.
0 comments:
Post a Comment