Swift safely unwrapping optinal strings and ints
问题 When I am about to fire my segue for the 2nd view I also send some values like this: if let aTime = ads[indexPath.row]["unix_t"].int { toView.time = aTime } if let aTitle = ads[indexPath.row]["title"].string { toView.title = aTitle } In the second VC I have declared the varibles like: var time: Int? var title: String? and this is how I unwrap the values: if time != nil { timeLabel.text = String(time!) } if title != nil { titleLabel.text = title! } This all works I never get any error caused