var people = [Mydata]()
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if segue.identifier == "thereSegue" ,
let destinationNavigationController = segue.destination as? UINavigationController ,
let nextScene = destinationNavigationController.topViewController as? commentView ,
let indexPath = self.myTable.indexPathForSelectedRow {
let selectedVehicle = people[indexPath.row]
nextScene.postId = (selectedVehicle.value(forKey: "iD") as? String)!
print(nextScene.postId)
nextScene.postType = (selectedVehicle.value(forKey: "pTYPE") as? String)!
print(nextScene.postType)
}
}
when I am trying to do
let jsonUrl = "https://www.zdoof.com/api/zTimeline/add_post_comment?"
let jsonUrlWithParameters = jsonUrl + "Comment=\(String(describing: self.commentText.text!))" + "&Post_id=\(postId)" + "&Post_type=\(postType)" + "&Created_by=4490" + "&Created_on=\(joinString)"
print(jsonUrlWithParameters)
it is printing
Optional(8167)
Optional(1)
So how to delete "optional"