In iOS 5.1 after dismissing MFMailComposeViewController my UIWebView page
java script not working and not loading data from disc chache
I am opening web url in UIWebView which contains some buttons with java
script actions. There is a button in this page email after hitting this
button I get email address and email body in
- (BOOL)webView:(UIWebView *)webView
shouldStartLoadWithRequest:(NSURLRequest *)request
navigationType:(UIWebViewNavigationType)navigationType{if( [requestString
rangeOfString:@"email.com"].location!=NSNotFound){if
([MFMailComposeViewController canSendMail]){if (!mailer)
mailer = [[MFMailComposeViewController alloc] init];
mailer.mailComposeDelegate = self;
NSString *subject = [dataManager.dictTransalations
objectForKey:@"71"];
[mailer setSubject:subject];
NSArray *toRecipients = [NSArray
arrayWithObjects:distributorEmailAddress.length > 0 ?
distributorEmailAddress:@"", nil];
[mailer setToRecipients:toRecipients];
[mailer setMessageBody:@"" isHTML:NO];
isFromMailVC=YES;
//[self presentViewController:mailer animated:YES
completion:NULL];
[self presentModalViewController:mailer animated:YES];
}}return NO;}
- (void)mailComposeController(MFMailComposeViewController*)controller
didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error{
switch (result)
{
case MFMailComposeResultCancelled:
NSLog(@"Mail cancelled: you cancelled the operation and no email
message was queued.");
break;
case MFMailComposeResultSaved:
NSLog(@"Mail saved: you saved the email message in the drafts folder.");
break;
case MFMailComposeResultSent:
NSLog(@"Mail send: the email message is queued in the outbox. It is
ready to send.");
break;
case MFMailComposeResultFailed:
NSLog(@"Mail failed: the email message was not saved or queued,
possibly due to an error.");
break;
default:
NSLog(@"Mail not sent.");
break;
}
[controller dismissModalViewControllerAnimated:YES];
NSLog(@" Mail Composer Error = %@",error);
}
After dismissing mailComposeController UIWebView java script does not work
on other buttons and also in another tab hit another web url that contains
some product list also shows blank with head image.
When I see the data in cache in documents directory its there in 100000.db
for List table.
I don't why it does not load after opening and dismissing mailcompose.
after quitting app from background it works.
Is there any way to debug UIWebView page in iOS 5.1 ?
Could you please some help me to resolve this issue.
No comments:
Post a Comment