Skip to content

Commit 9854481

Browse files
committed
update for 6.1
1 parent e0553f0 commit 9854481

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

bk2ch12p611tabBarMore/ch25p882tabBarMore/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class AppDelegate : UIResponder, UIApplicationDelegate {
3232
more.navigationBar.tintColor = UIColor.whiteColor() // oooh oooh
3333

3434
let tv = list.view as UITableView
35-
let mds = MyDataSource(originalDataSource: tv.dataSource)
35+
let mds = MyDataSource(originalDataSource: tv.dataSource!)
3636
self.myDataSource = mds
3737
tv.dataSource = mds
3838

bk2ch12p611tabBarMore/ch25p882tabBarMore/MyDataSource.swift

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,24 @@ class MyDataSource: NSObject, UITableViewDataSource {
1010
super.init()
1111
}
1212

13-
override func forwardingTargetForSelector(aSelector: Selector) -> AnyObject! {
13+
override func forwardingTargetForSelector(aSelector: Selector) -> AnyObject? {
1414
if self.originalDataSource.respondsToSelector(aSelector) {
1515
return self.originalDataSource
1616
}
1717
return super.forwardingTargetForSelector(aSelector)
1818
}
1919

20-
func tableView(tv: UITableView!, numberOfRowsInSection sec: Int) -> Int {
20+
func tableView(tv: UITableView, numberOfRowsInSection sec: Int) -> Int {
2121
// this is just to quiet the compiler
2222
return self.originalDataSource.tableView(tv, numberOfRowsInSection: sec)
2323
}
2424

25-
func tableView(tv: UITableView!, cellForRowAtIndexPath ip: NSIndexPath!) -> UITableViewCell! {
25+
func tableView(tv: UITableView, cellForRowAtIndexPath ip: NSIndexPath) -> UITableViewCell {
2626
// this is why we are here
2727
let cell = self.originalDataSource.tableView(tv, cellForRowAtIndexPath: ip)
28-
cell.textLabel.font = UIFont(name: "GillSans-Bold", size: 14)
28+
cell.textLabel!.font = UIFont(name: "GillSans-Bold", size: 14)!
2929
return cell
3030
}
3131

3232
}
33+

0 commit comments

Comments
 (0)