Skip to content

Instantly share code, notes, and snippets.

@Bashta
Created July 27, 2015 12:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Bashta/a6e91cbf3525c9f43b3d to your computer and use it in GitHub Desktop.
Save Bashta/a6e91cbf3525c9f43b3d to your computer and use it in GitHub Desktop.
func setupCellForPublic() {
let name: String = utils.getParamFromDictionary(cellData, searchKey: "message_author_name", defaultStr: "?")
titleLabel?.text = name
let currentVenue = utils.getParamFromDictionary(cellData, searchKey: "message_current_venue", defaultStr: "?")
messageSenderLabel?.text = currentVenue
let timeAgo = utils.getParamFromDictionary(cellData, searchKey: "message_last_message_time", defaultStr: "?")
messageTimeLabel?.text = timeAgo
let preview = utils.getParamFromDictionary(cellData, searchKey: "message_preview", defaultStr: "?")
messageLabel?.text = preview
if let imageName = cellData?["message_main_image_url"] as? String {
utils.downloadImage(imageName, handler: {image in self.userImage?.image = image})
} else {
userImage?.image = UIImage(named:"group_chat_icon")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment