Skip to content

Commit 40f4458

Browse files
committed
Bridging to Objective-C
1 parent 8a70524 commit 40f4458

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.markdown

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ Always use Swift's native types when available. Swift offers bridging to Objecti
251251

252252
**Preferred:**
253253
```swift
254-
let width = 120.0 //Double
255-
let widthString = width.bridgeToObjectiveC().stringValue //String
254+
let width = 120.0 //Double
255+
let widthString = (width as NSNumber).stringValue //String
256256
```
257257

258258
**Not Preferred:**

0 commit comments

Comments
 (0)