Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class Model

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

let loremIpsumText = loremIpsumRandom.reduce("") { "\($0) \($1)" } // join the array of words to make a string
return "\(loremIpsumText)!!!" // append "!!!" so that we always know what the ending characters are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import UIKit

class NibTableViewCell: UITableViewCell
{
@IBOutlet var titleLabel: UILabel
@IBOutlet var bodyLabel: UILabel
@IBOutlet weak var titleLabel: UILabel!
@IBOutlet weak var bodyLabel: UILabel!

override func awakeFromNib()
{
Expand Down