iphone - Problem with a NSString that equals to (null) -
I want to get and
I have a problem, I always want NSString (faucet) instead of the desired value.
Here's my code and NSString How get I assume MainViewController:
- (minus) webViewDidFinishLoad: (UIWebView *) webView {leftWebViewString = [NSString stringWithString: leftWebView .request.URL.absoluteString]; }
Left Voicing Week Controller. H:
#import & lt; UIKit / UIKit.h & gt; #import "Main vs Controller H" # Import & lt; Message UI / MessageIiH & GT; #important & lt; Message ii / mfmail combo viewcontroller.h & gt; @ Class MainViewController; @ Interface Left Sharing Controller: UIViewController & lt; MFMailComposeViewControllerDelegate & gt; {Main view controller * Main view controller; NSString * leftWebViewUrl; } @ Property (non-nominal, retained) Main view controller * Main view controller; @property (nontomic, write) NSString * leftWebViewUrl; @end
LeftSharingViewController.m:
#import "LeftSharingViewController.h" #import "MainViewController.h" @ implementation LeftSharingViewController @Synthesize mainViewController; @ Synthesize the left side of the verbiage; - (Zero) ViewWill API: (BOOL) Animated {self.leftWebViewUrl = self.mainViewController.leftWebViewString; } #pragma mark - #pragma mark Compose Mail - (minus) displayComposer sheet {MFMailComposeViewController * mailPicker = [[MFMailComposeViewController alloc] init]; MailPicker.mailComposeDelegate = self; [Mailpeak set topic: @ "check this website!"]; [MailPicker setMessageBody: [NSString stringWithFormat: @ "Take a look at this site: The% @", leftWebViewUrl] HTML: YES]; MailPicker.modalPresentationStyle = UIModal Presentation Formats; [Self current model view controller: animated mailpicker: yes]; [Mailpiker release]; }
Thanks!