JCChatViewLayoutAttributes.swift 804 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // JCChatViewLayoutAttributes.swift
  3. // JChat
  4. //
  5. // Created by deng on 2017/3/1.
  6. // Copyright © 2017年 HXHG. All rights reserved.
  7. //
  8. import UIKit
  9. @objc public enum JCChatViewLayoutItem: Int {
  10. case all
  11. case card
  12. case avatar
  13. case bubble
  14. case content
  15. case tips
  16. }
  17. @objc open class JCChatViewLayoutAttributes: UICollectionViewLayoutAttributes {
  18. public override init() {
  19. super.init()
  20. }
  21. open override func copy(with zone: NSZone? = nil) -> Any {
  22. let new = super.copy(with: zone)
  23. if let new = new as? JCChatViewLayoutAttributes {
  24. new.info = info
  25. }
  26. return new
  27. }
  28. open var message: JCMessageType? {
  29. return info?.message
  30. }
  31. open var info: JCChatViewLayoutAttributesInfo?
  32. }