Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>What i did to do this is that I make a new view controller which has webView in it. A property URLstring which get set when the OpenURL method starts. You have to implement delegate methods of webView if you need. The code that I am using is</p> <p><strong>in WebViewCOntroller.h</strong></p> <pre><code>@interface WebViewController : UIViewController &lt;UIWebViewDelegate&gt;{ IBOutlet UIWebView *webView; UIView *activityView; } @property (nonatomic, retain) NSString *buyProductLink; @end </code></pre> <p><strong>in WebViewController.m</strong></p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; webView.scalesPageToFit = YES; NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:self.buyProductLink]]; [webView loadRequest:request]; [request release]; } - (BOOL) webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType { return YES; } - (void) webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { [activityView removeFromSuperview]; } - (void) webViewDidFinishLoad:(UIWebView *)webView { [activityView removeFromSuperview]; [activityView release]; activityView = nil; } </code></pre> <p>In openURL method use</p> <pre><code>WebViewController *webViewVC = [[WebViewController alloc] initWithNibName:@"WebViewController" bundle:nil]; webViewVC.buyProductLink = [NSString stringWithFormat:@"%@",result]; [self.navigationController pushViewController:webViewVC animated:YES]; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload