Hi,
I have a uitextview which displays me the some data. Sometimes it fills out my textview (you need to scroll down) and sometimes it doesn't.
Now I want to send this data via email useing NSUTF8StringEncoding.
The problem is when the textview is not filled out the app imports the data properly into Mail but if the text is filled out the email-button doesn't call any action. It just gets clicked down but nothing happen.
This is my code I am using:
Quote:
- (IBAction)start {
myTimer1 = [NSTimer scheduledTimerWithTimeInterval:0.10 target:self selector:@selector(timerFired: ) userInfo:nil repeats:YES];
recordingText.text = [NSString stringWithFormat: @"Recording Started:\n%s\n", [[[NSDate date]
descriptionWithCalendarFormat:@"%a, %d %b %Y %H:%M:%S" timeZone:nil
locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]
UTF8String]];
|
Quote:
- (void)timerFired: (NSTimer *)timer{
recordingText.text = [NSString stringWithFormat:@"%@\nX: %f Y: %f Z: %f", recordingText.text, x , y , z];
}
|
Quote:
- (IBAction)email {
NSString *gtv = recordingText.text;
NSString *urlString = [NSString stringWithFormat:@"mailto:?subject=iPhone&body=%@" , gtv];
NSString *fixedURL = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8St ringEncoding];
NSURL *url = [NSURL URLWithString:fixedURL];
[[UIApplication sharedApplication] openURL:url];
}
|
Doe anybody see the problem? What am I doing wrong?
Thanks alot!