clean code

This commit is contained in:
nixzhu
2016-01-20 15:01:23 +08:00
parent 562641b897
commit e49e07eca3
3 changed files with 0 additions and 45 deletions
-21
View File
@@ -62,27 +62,6 @@ extension UIImageView {
}
}
/*
// MARK: - Message
private var messageImageURLKey: Void?
extension UIImageView {
private var yep_messageImageURL: NSURL? {
return objc_getAssociatedObject(self, &messageImageURLKey) as? NSURL
}
private func yep_setMessageImageURL(URL: NSURL) {
objc_setAssociatedObject(self, &messageImageURLKey, URL, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
}
func yep_setImageOfMessage(message: Message, withSize size: CGSize) {
}
}
*/
// MARK: - AttachmentURL
private var attachmentURLKey: Void?
@@ -94,8 +94,6 @@ class ChatLeftImageCell: ChatBaseCell {
if let image = image {
self?.messageImageView.image = image
//self?.messageImageView.alpha = 1.0
}
}
@@ -107,13 +105,6 @@ class ChatLeftImageCell: ChatBaseCell {
dispatch_async(dispatch_get_main_queue()) { [weak self] in
// self?.messageImageView.image = image
//
// UIView.animateWithDuration(YepConfig.ChatCell.imageAppearDuration, delay: 0.0, options: .CurveEaseInOut, animations: { [weak self] in
// self?.messageImageView.alpha = 1.0
// }, completion: { (finished) -> Void in
// })
guard let strongSelf = self else {
return
}
@@ -150,10 +141,6 @@ class ChatLeftImageCell: ChatBaseCell {
}
loadingProgress = 0
// dispatch_async(dispatch_get_main_queue()) { [weak self] in
// self?.messageImageView.alpha = 0.0
// }
if let (imageWidth, imageHeight) = imageMetaOfMessage(message) {
@@ -67,13 +67,6 @@ class ChatRightImageCell: ChatRightBaseCell {
dispatch_async(dispatch_get_main_queue()) { [weak self] in
// self?.messageImageView.image = image
//
// UIView.animateWithDuration(YepConfig.ChatCell.imageAppearDuration, delay: 0.0, options: .CurveEaseInOut, animations: { () -> Void in
// self?.messageImageView.alpha = 1.0
// }, completion: { (finished) -> Void in
// })
guard let strongSelf = self else {
return
}
@@ -103,10 +96,6 @@ class ChatRightImageCell: ChatRightBaseCell {
}
loadingProgress = 0
// dispatch_async(dispatch_get_main_queue()) { [weak self] in
// self?.messageImageView.alpha = 0.0
// }
if let (imageWidth, imageHeight) = imageMetaOfMessage(message) {