Created
July 27, 2015 12:30
-
-
Save Bashta/a6e91cbf3525c9f43b3d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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