JCHATMoreView.m 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. //
  2. // JPIMMore.m
  3. // JPush IM
  4. //
  5. // Created by Apple on 14/12/30.
  6. // Copyright (c) 2014年 Apple. All rights reserved.
  7. //
  8. #import "JCHATMoreView.h"
  9. #import "JChatConstants.h"
  10. #import "ViewUtil.h"
  11. @implementation JCHATMoreView
  12. - (void)drawRect:(CGRect)rect {
  13. }
  14. - (IBAction)photoBtnClick:(id)sender {
  15. if (self.delegate &&[self.delegate respondsToSelector:@selector(photoClick)]) {
  16. [self.delegate photoClick];
  17. }
  18. }
  19. - (IBAction)cameraBtnClick:(id)sender {
  20. if (self.delegate &&[self.delegate respondsToSelector:@selector(cameraClick)]) {
  21. [self.delegate cameraClick];
  22. }
  23. }
  24. - (IBAction)clickVoiceInputBtn:(UIButton *)sender {
  25. if (self.delegate &&[self.delegate respondsToSelector:@selector(voiceInputClick)]) {
  26. [self.delegate voiceInputClick];
  27. }
  28. }
  29. - (IBAction)clickLoactionBtn:(UIButton *)sender {
  30. if (self.delegate &&[self.delegate respondsToSelector:@selector(locationClick)]) {
  31. [self.delegate locationClick];
  32. }
  33. }
  34. @end
  35. @implementation JCHATMoreViewContainer
  36. - (id)initWithCoder:(NSCoder *)aDecoder {
  37. self = [super initWithCoder:aDecoder];
  38. if (self) {
  39. }
  40. return self;
  41. }
  42. - (void)awakeFromNib {
  43. [super awakeFromNib];
  44. self.frame = CGRectMake(0, 0, _window_width, kMoreHeight);
  45. self.backgroundColor = Normal_Color;
  46. _moreView = NIB(JCHATMoreView);
  47. _moreView.frame =CGRectMake(0, 0, _window_width, kMoreHeight);
  48. _moreView.backgroundColor = Normal_Color;
  49. [_moreView.photoBtn setTitle:YZMsg(@"图片") forState:0];
  50. [_moreView.cameraBtn setTitle:YZMsg(@"相机-sm") forState:0];
  51. [_moreView.voiceInputBtn setTitle:YZMsg(@"语音") forState:0];
  52. [_moreView.locationBtn setTitle:YZMsg(@"位置") forState:0];
  53. _moreView.photoBtn = [PublicObj setUpImgDownText:_moreView.photoBtn space:15];
  54. _moreView.cameraBtn = [PublicObj setUpImgDownText:_moreView.cameraBtn space:15];
  55. _moreView.voiceInputBtn = [PublicObj setUpImgDownText:_moreView.voiceInputBtn space:15];
  56. _moreView.locationBtn = [PublicObj setUpImgDownText:_moreView.locationBtn space:15];
  57. // [_toolbar drawRect:_toolbar.frame];
  58. // _toolbar.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
  59. [self addSubview:_moreView];
  60. }
  61. @end