NIMSessionMessageContentView.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // NIMSessionMessageContentView.h
  3. // NIMKit
  4. //
  5. // Created by chris.
  6. // Copyright (c) 2015年 Netease. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "NIMKitEvent.h"
  10. @class NIMKitBubbleStyleObject;
  11. @protocol NIMMessageContentViewDelegate <NSObject>
  12. - (void)onCatchEvent:(NIMKitEvent *)event;
  13. @end
  14. @class NIMMessageModel;
  15. @interface NIMSessionMessageContentView : UIControl
  16. @property (nonatomic,strong,readonly) NIMMessageModel *model;
  17. @property (nonatomic,strong) UIImageView * bubbleImageView;
  18. @property (nonatomic,weak) id<NIMMessageContentViewDelegate> delegate;
  19. /**
  20. * contentView初始化方法
  21. *
  22. * @return content实例
  23. */
  24. - (instancetype)initSessionMessageContentView;
  25. /**
  26. * 刷新方法
  27. *
  28. * @param data 刷新数据
  29. *
  30. */
  31. - (void)refresh:(NIMMessageModel*)data;
  32. /**
  33. * 手指从contentView内部抬起
  34. */
  35. - (void)onTouchUpInside:(id)sender;
  36. /**
  37. * 手指从contentView外部抬起
  38. */
  39. - (void)onTouchUpOutside:(id)sender;
  40. /**
  41. * 手指按下contentView
  42. */
  43. - (void)onTouchDown:(id)sender;
  44. /**
  45. * 聊天气泡图
  46. *
  47. * @param state 目前的按压状态
  48. * @param outgoing 是否是发出去的消息
  49. *
  50. */
  51. - (UIImage *)chatBubbleImageForState:(UIControlState)state outgoing:(BOOL)outgoing;
  52. @end