Hi,
I have an NSString in an NSObject file, I inherited this NSString into my MainViewController where it gets the value. Now, I want to use this NSString value in another UIViewController subclass. From some reason I always get (null) Here's my code:
MainViewController:
leftWebViewUrl = [NSMutableString stringWithString:leftWebView.request.URL.absoluteString];
rightWebViewUrl = [NSMutableString stringWithString:rightWebView.request.URL.absoluteString];
The other UIViewController subclass:
-(void)launchMailAppOnDevice {
MFMailComposeViewController *mailPicker = [[MFMailComposeViewController alloc] init];
[mailPicker setSubject:@"Check Out This Website!"];
[mailPicker setMessageBody:[NSString stringWithFormat:@"Take a look at this site:%@", leftWebViewUrl] isHTML:YES];
NSString *toRecipients = @"";
NSString *email = [NSString stringWithFormat:@"%@", toRecipients];
email = [email stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:email]];
}
Thanks