스위프트

let url = Bundle.main.url(forResource: "파일이름", withExtension: "pdf")

 

if let url = url {

    let webView = WKWebView(frame: view.frame)

    let urlRequest = URLRequest(url: url)

    webView.load(urlRequest)

}

 

Objective-C

NSURL *bundleUrl = [[NSBundle mainBundle] URLForResource:@"파일이름" withExtension:@"pdf"];

[self.popupWebView loadRequest:[NSURLRequest requestWithURL:bundleUrl]];

Posted by 자바리즘
,