Skip to content

Commit ab2ad1e

Browse files
committed
Merge pull request #4 from shagedorn/bugfix/swiftUpdate
Changes to fix compiler errors with beta 3 and 4
2 parents b38f55d + cc07be7 commit ab2ad1e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

TableViewCellWithAutoLayout/TableViewController/Model.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Model
4242

4343
let minimumNumberOfWords = 3
4444
let r = max(minimumNumberOfWords, random() % loremIpsumArray.count) // get a random number r, where: minimumNumberOfWords <= r <= loremIpsumArray.count
45-
let loremIpsumRandom = loremIpsumArray[0..r] // grab a slice of the lorem ipsum array that contains r number of words
45+
let loremIpsumRandom = loremIpsumArray[0..<r] // grab a slice of the lorem ipsum array that contains r number of words
4646

4747
let loremIpsumText = loremIpsumRandom.reduce("") { "\($0) \($1)" } // join the array of words to make a string
4848
return "\(loremIpsumText)!!!" // append "!!!" so that we always know what the ending characters are

TableViewCellWithAutoLayout/TableViewController/NibTableViewCell.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import UIKit
99

1010
class NibTableViewCell: UITableViewCell
1111
{
12-
@IBOutlet var titleLabel: UILabel
13-
@IBOutlet var bodyLabel: UILabel
12+
@IBOutlet weak var titleLabel: UILabel!
13+
@IBOutlet weak var bodyLabel: UILabel!
1414

1515
override func awakeFromNib()
1616
{

0 commit comments

Comments
 (0)