IModelChatCell.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /************************************************************
  2. * * Hyphenate CONFIDENTIAL
  3. * __________________
  4. * Copyright (C) 2016 Hyphenate Inc. All rights reserved.
  5. *
  6. * NOTICE: All information contained herein is, and remains
  7. * the property of Hyphenate Inc.
  8. * Dissemination of this information or reproduction of this material
  9. * is strictly forbidden unless prior written permission is obtained
  10. * from Hyphenate Inc.
  11. */
  12. #import <Foundation/Foundation.h>
  13. #import "IModelCell.h"
  14. /** @brief 消息cell的协议,实现了IModelCell协议 */
  15. @protocol IModelChatCell <NSObject,IModelCell>
  16. @required
  17. /** @brief 消息对象model */
  18. @property (strong, nonatomic) id model;
  19. @optional
  20. /*!
  21. @method
  22. @brief 判断是否需要自定义气泡
  23. @param model 消息对象model
  24. @return 是否需要自定义气泡
  25. */
  26. - (BOOL)isCustomBubbleView:(id)model;
  27. /*!
  28. @method
  29. @brief 根据消息model变更气泡样式
  30. @param model 消息对象
  31. @return UITableViewCell
  32. */
  33. - (void)setCustomBubbleView:(id)model;
  34. /*!
  35. @method
  36. @brief 设置自定义cell的消息对象
  37. @param model 消息对象
  38. @return UITableViewCell
  39. */
  40. - (void)setCustomModel:(id)model;
  41. /*!
  42. @method
  43. @brief 更新自定义气泡的边距
  44. @param bubbleMargin 待更新的边距
  45. @param model 消息对象
  46. @return UITableViewCell
  47. */
  48. - (void)updateCustomBubbleViewMargin:(UIEdgeInsets)bubbleMargin model:(id)mode;
  49. @optional
  50. /*!
  51. @method
  52. @brief 初始化消息cell
  53. @param style cell的样式
  54. @param reuseIdentifier cell的重用标识符
  55. @param model 消息对象
  56. @return UITableViewCell
  57. */
  58. - (instancetype)initWithStyle:(UITableViewCellStyle)style
  59. reuseIdentifier:(NSString *)reuseIdentifier
  60. model:(id)model;
  61. @end