私は、アプリケーションのロード時に私のウェブサイトを開くObjective-cアプリケーションを持っています。URLがObjecitve-Cの私のウェブサイトと異なるかどうかを検出します
私のウェブサイトのリンクのほとんどは、異なるウェブサイト/ URLを指しています。
私の目的-Cコードを更新しようとしています。どこのURLが私のウェブサイトと異なる場合、私のAPPで開くのではなく、SafariブラウザでURLを開きます。
これも可能ですか?ここで
が私のコードである
ViewController.h
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@end
ViewController.m
#import "ViewController.h"
@interface ViewController()
@end
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
// Load the url into the webview
NSURL *url = [NSURL URLWithString:@"http://mywebsite.com/"];
[self.webView loadRequest:[NSURLRequest requestWithURL:url]];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
をあなたは 'UIWebViewDelegate'の方法で見たことがありますか? – rmaddy
http://stackoverflow.com/questions/28040261/how-to-load-only-html-page-in-webview-and-all-www-page-load-in-safari-in-ios – rmaddy