Skip to content

Commit a7ccc55

Browse files
author
pixel-ink
committed
Demoを速くする
1 parent 1abc17e commit a7ccc55

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

PIImageCache/PIImageCache/TableViewController.swift

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,15 @@ class TableViewCell : UITableViewCell {
99

1010
class TableViewController : UITableViewController {
1111

12+
override func viewDidLoad() {
13+
super.viewDidLoad()
14+
var urls: [NSURL] = []
15+
for category in lormpixelCategory {
16+
urls.append( NSURL(string: "http://lorempixel.com/200/200/" + category)! )
17+
}
18+
PIImageCache.shared.prefetch(urls)
19+
}
20+
1221
let lormpixelCategory =
1322
[ "abstract", "animals", "business", "cats", "city", "food", "nightlife", "fashion", "people", "nature", "sports", "technics", "transport", "abstract", "animals", "business", "cats", "city", "food", "nightlife", "fashion", "people", "nature", "sports", "technics", "transport" ]
1423

0 commit comments

Comments
 (0)