Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: Walkthrough.playground/Contents.swift

Issue 29664569: Favicon: Issue 6245 - SwiftLinted project files (Closed)
Left Patch Set: Created Jan. 12, 2018, 11:04 a.m.
Right Patch Set: Removed the sorted_imports rule and reversed the import calls to be sorted alphabetically Created Feb. 19, 2018, 10:38 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « FavIconTests/HTMLDocumentTests.swift ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 //: # FavIcon 1 //: # FavIcon
2 //: Welcome to the introduction for the FavIcon library. I hope you find it usef ul and easy to use. 2 //: Welcome to the introduction for the FavIcon library. I hope you find it usef ul and easy to use.
3 //: I'll walk you through the various usage scenarios. 3 //: I'll walk you through the various usage scenarios.
4 //: 4 //:
5 //: *Important:* You'll need Internet access to get the most out of this playgro und. 5 //: *Important:* You'll need Internet access to get the most out of this playgro und.
6 //: 6 //:
7 //: First, you need to import `FavIcon` to pull in the library into the current file. 7 //: First, you need to import `FavIcon` to pull in the library into the current file.
8 import FavIcon 8 import FavIcon
9 //: We'll use `downloadPreferred(url:width:height:completion:)` first, which tri es to download the "best" icon. 9 //: We'll use `downloadPreferred(url:width:height:completion:)` first, which tri es to download the "best" icon.
10 //: If you know the size you want, you can provide values for the optional `widt h` and `height` parameters, 10 //: If you know the size you want, you can provide values for the optional `widt h` and `height` parameters,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 //: If one is to your liking, you can download it using `download(url:completion :)`. 49 //: If one is to your liking, you can download it using `download(url:completion :)`.
50 FavIcon.download([icon]) { results in 50 FavIcon.download([icon]) { results in
51 for result in results { 51 for result in results {
52 if case let .success(image) = result { 52 if case let .success(image) = result {
53 let icon = image 53 let icon = image
54 } 54 }
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
59
60
61
62
63 //: That's it. Good luck, have fun! 59 //: That's it. Good luck, have fun!
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78 //: You don't actually need the next two lines when you're using this library, t hey're just here so 60 //: You don't actually need the next two lines when you're using this library, t hey're just here so
79 //: that network requests get a chance to execute when inside a playground. 61 //: that network requests get a chance to execute when inside a playground.
80 import PlaygroundSupport 62 import PlaygroundSupport
81 PlaygroundPage.current.needsIndefiniteExecution = true 63 PlaygroundPage.current.needsIndefiniteExecution = true
LEFTRIGHT

Powered by Google App Engine
This is Rietveld