Skip to content

Commit 3b11027

Browse files
committed
remove unnecessary use of NSString
1 parent 96f5ced commit 3b11027

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bk2ch11p552webkit/ch24p825webview/WebViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ class WebViewController: UIViewController, WKNavigationDelegate, WKScriptMessage
198198
self.navigationItem.rightBarButtonItems = [b]
199199

200200
let bodypath = NSBundle.mainBundle().pathForResource("htmlbody", ofType:"txt")!
201-
let ss = NSString(contentsOfFile:bodypath, encoding:NSUTF8StringEncoding, error:nil)!
201+
let ss = String(contentsOfFile:bodypath, encoding:NSUTF8StringEncoding, error:nil)!
202202

203203
let templatepath = NSBundle.mainBundle().pathForResource("htmlTemplate", ofType:"txt")!
204204
let base = NSURL.fileURLWithPath(templatepath)!
205-
var s = NSString(contentsOfFile:templatepath, encoding:NSUTF8StringEncoding, error:nil)!
205+
var s = String(contentsOfFile:templatepath, encoding:NSUTF8StringEncoding, error:nil)!
206206

207207
s = s.stringByReplacingOccurrencesOfString("<maximagewidth>", withString:"80%")
208208
s = s.stringByReplacingOccurrencesOfString("<margin>", withString:"10")

0 commit comments

Comments
 (0)