JCHATConversationViewController.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // JCHATSendMessageViewController.h
  3. // JPush IM
  4. //
  5. // Created by Apple on 14/12/26.
  6. // Copyright (c) 2014年 Apple. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "JCHATToolBar.h"
  10. #import "JCHATMoreView.h"
  11. #import "JCHATRecordAnimationView.h"
  12. #import "JCHATChatModel.h"
  13. #import "XHVoiceRecordHUD.h"
  14. #import "XHVoiceRecordHelper.h"
  15. //#import "JCHATVoiceTableViewCell.h"
  16. #import "JCHATMessageTableView.h"
  17. #import "JCHATMessageTableViewCell.h"
  18. #import "JCHATPhotoPickerViewController.h"
  19. #import "MessageListModel.h"
  20. typedef void (^chatSmallBlock)(int type);
  21. typedef void (^CanSendBlock)(BOOL canSend);
  22. #define interval 60*2 //static =const
  23. #define navigationRightButtonRect CGRectMake(0, 0, 14, 17)
  24. #define messageTableColor [UIColor colorWithRed:236/255.0 green:237/255.0 blue:240/255.0 alpha:1]
  25. static NSInteger const messagePageNumber = 25;
  26. static NSInteger const messagefristPageNumber = 20;
  27. @interface JCHATConversationViewController : YBBaseViewController <
  28. UITableViewDataSource,
  29. UITableViewDelegate,
  30. SendMessageDelegate,
  31. AddBtnDelegate,
  32. UIImagePickerControllerDelegate,
  33. UINavigationControllerDelegate,
  34. PictureDelegate,
  35. playVoiceDelegate,
  36. UIGestureRecognizerDelegate,
  37. UIAlertViewDelegate,
  38. JMessageDelegate,
  39. UIScrollViewDelegate,
  40. JCHATPhotoPickerViewControllerDelegate,
  41. UITextViewDelegate>{
  42. }
  43. /** tableView 距离顶部的距离 */
  44. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *messageTabTop;
  45. @property (weak, nonatomic) IBOutlet JCHATMessageTableView *messageTableView;
  46. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *toolBarHeightConstrait;
  47. @property (weak, nonatomic) IBOutlet JCHATToolBarContainer *toolBarContainer;
  48. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *toolBarToBottomConstrait;
  49. @property (weak, nonatomic) IBOutlet JCHATMoreViewContainer *moreViewContainer;
  50. @property (weak, nonatomic) IBOutlet NSLayoutConstraint *moreViewHeight;
  51. @property(nonatomic, assign) JPIMInputViewType textViewInputViewType;
  52. @property(assign, nonatomic) BOOL barBottomFlag;
  53. @property(nonatomic, strong, readwrite) XHVoiceRecordHUD *voiceRecordHUD;
  54. @property(strong, nonatomic) JMSGConversation *conversation;
  55. @property(strong, nonatomic) NSString *targetName;
  56. @property(assign, nonatomic) BOOL isConversationChange;
  57. @property(weak,nonatomic)id superViewController;
  58. @property(nonatomic,strong)MessageListModel *userModel;
  59. @property(nonatomic,assign)BOOL isWhiteStyle; //YES:直播间内、NO:tab-消息
  60. /**
  61. * 管理录音工具对象
  62. */
  63. @property(nonatomic, strong) XHVoiceRecordHelper *voiceRecordHelper;
  64. /**
  65. * 记录旧的textView contentSize Heigth
  66. */
  67. @property(nonatomic, assign) CGFloat previousTextViewContentHeight;
  68. @property (nonatomic,copy) chatSmallBlock block;
  69. - (void)setupView;
  70. - (void)prepareImageMessage:(UIImage *)img;
  71. - (void)reloadSamllChtaView:(NSString *)isatt;
  72. @end