diff --git a/Yep.xcodeproj/project.pbxproj b/Yep.xcodeproj/project.pbxproj index 7e0dbf3c..b8a140f3 100644 --- a/Yep.xcodeproj/project.pbxproj +++ b/Yep.xcodeproj/project.pbxproj @@ -269,6 +269,7 @@ 50D45FC31C44D2300044C95A /* OpenGraphService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D45FC21C44D2300044C95A /* OpenGraphService.swift */; }; 50D4D0DB1AFA825B005AEB6F /* MediaControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50D4D0DA1AFA825B005AEB6F /* MediaControlView.swift */; }; 50DBDEF11C48C2240044E21B /* FeedURLInfoType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50DBDEF01C48C2240044E21B /* FeedURLInfoType.swift */; }; + 50DBDEF91C4CBB040044E21B /* ChatLeftTextURLCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50DBDEF81C4CBB040044E21B /* ChatLeftTextURLCell.swift */; }; 50DEE02C1BE209FF00015741 /* DeletedFeedConversationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50DEE02A1BE209FF00015741 /* DeletedFeedConversationCell.swift */; }; 50DEE02D1BE209FF00015741 /* DeletedFeedConversationCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 50DEE02B1BE209FF00015741 /* DeletedFeedConversationCell.xib */; }; 50DEE0311BE339B000015741 /* LoadMoreTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50DEE02F1BE339B000015741 /* LoadMoreTableViewCell.swift */; }; @@ -649,6 +650,7 @@ 50D45FC21C44D2300044C95A /* OpenGraphService.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = OpenGraphService.swift; path = Services/OpenGraphService.swift; sourceTree = ""; }; 50D4D0DA1AFA825B005AEB6F /* MediaControlView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MediaControlView.swift; path = Views/Media/MediaControlView.swift; sourceTree = ""; }; 50DBDEF01C48C2240044E21B /* FeedURLInfoType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FeedURLInfoType.swift; path = Protocols/FeedURLInfoType.swift; sourceTree = ""; }; + 50DBDEF81C4CBB040044E21B /* ChatLeftTextURLCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ChatLeftTextURLCell.swift; path = Views/Cells/ChatLeftTextURL/ChatLeftTextURLCell.swift; sourceTree = ""; }; 50DEE02A1BE209FF00015741 /* DeletedFeedConversationCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DeletedFeedConversationCell.swift; path = Views/Cells/DeletedFeedConversation/DeletedFeedConversationCell.swift; sourceTree = ""; }; 50DEE02B1BE209FF00015741 /* DeletedFeedConversationCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DeletedFeedConversationCell.xib; path = Views/Cells/DeletedFeedConversation/DeletedFeedConversationCell.xib; sourceTree = ""; }; 50DEE02F1BE339B000015741 /* LoadMoreTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = LoadMoreTableViewCell.swift; path = Views/Cells/LoadMore/LoadMoreTableViewCell.swift; sourceTree = ""; }; @@ -1251,6 +1253,7 @@ 508B717E1B1FE9BD006BDDB3 /* ChatRightBase */, 503315991AC101830008A209 /* ChatLeftText */, 5033159E1AC101CB0008A209 /* ChatRightText */, + 50DBDEFA1C4CBB0F0044E21B /* ChatLeftTextURL */, 50CDBE4B1ACBAD3700459CE0 /* ChatLeftImage */, 50CDBE441ACA9B4600459CE0 /* ChatRightImage */, 50EB8CC11AE89EDE001AC1EE /* ChatLeftVideo */, @@ -2095,6 +2098,14 @@ name = Protocols; sourceTree = ""; }; + 50DBDEFA1C4CBB0F0044E21B /* ChatLeftTextURL */ = { + isa = PBXGroup; + children = ( + 50DBDEF81C4CBB040044E21B /* ChatLeftTextURLCell.swift */, + ); + name = ChatLeftTextURL; + sourceTree = ""; + }; 50DEE02E1BE20A0400015741 /* DeletedFeedConversation */ = { isa = PBXGroup; children = ( @@ -2867,6 +2878,7 @@ 502AE5351AB8649F005BD199 /* LoginByMobileViewController.swift in Sources */, 506BB7F91AE5069500C1A2A0 /* RegisterPickSkillsSelectSkillsTransitionManager.swift in Sources */, 50B8E6181B41340A00C17EA1 /* MessageLoadingProgressView.swift in Sources */, + 50DBDEF91C4CBB040044E21B /* ChatLeftTextURLCell.swift in Sources */, 505A48401B4E70CB00C3A301 /* RegisterSelectSkillsLayout.swift in Sources */, 502AE52B1AB819AF005BD199 /* YepConfig.swift in Sources */, 50B38FB71B69CD960064C132 /* Array+Yep.swift in Sources */, diff --git a/Yep/Views/Cells/ChatLeftTextURL/ChatLeftTextURLCell.swift b/Yep/Views/Cells/ChatLeftTextURL/ChatLeftTextURLCell.swift new file mode 100644 index 00000000..eada425c --- /dev/null +++ b/Yep/Views/Cells/ChatLeftTextURL/ChatLeftTextURLCell.swift @@ -0,0 +1,33 @@ +// +// ChatLeftTextURLCell.swift +// Yep +// +// Created by nixzhu on 16/1/18. +// Copyright © 2016年 Catch Inc. All rights reserved. +// + +import UIKit + +class ChatLeftTextURLCell: ChatLeftTextCell { + + lazy var feedURLContainerView: FeedURLContainerView = { + let view = FeedURLContainerView() + view.compressionMode = false + return view + }() + + override func awakeFromNib() { + super.awakeFromNib() + + contentView.addSubview(feedURLContainerView) + } + + override func configureWithMessage(message: Message, textContentLabelWidth: CGFloat, collectionView: UICollectionView, indexPath: NSIndexPath) { + + super.configureWithMessage(message, textContentLabelWidth: textContentLabelWidth, collectionView: collectionView, indexPath: indexPath) + + let frame = CGRect(x: textContainerView.frame.origin.x, y: textContainerView.frame.origin.y + 10, width: 220, height: 100) + feedURLContainerView.frame = frame + } +} +