NIMTeamCardOperationItem.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // TeamCardOperationItem.m
  3. // NIM
  4. //
  5. // Created by chris on 15/3/5.
  6. // Copyright (c) 2015年 Netease. All rights reserved.
  7. //
  8. #import "NIMTeamCardOperationItem.h"
  9. #import "UIImage+NIMKit.h"
  10. @interface NIMTeamCardOperationItem()
  11. @property(nonatomic,assign) NIMKitCardHeaderOpeator opera;
  12. @end
  13. @implementation NIMTeamCardOperationItem
  14. - (instancetype)initWithOperation:(NIMKitCardHeaderOpeator)opera{
  15. self = [self init];
  16. if (self) {
  17. [self buildWithTeamCardOperation:opera];
  18. }
  19. return self;
  20. }
  21. - (void)buildWithTeamCardOperation:(NIMKitCardHeaderOpeator)opera{
  22. _opera = opera;
  23. switch (opera) {
  24. case CardHeaderOpeatorAdd:
  25. _title = @"加入";
  26. _imageNormal = [UIImage nim_imageInKit:@"icon_add_normal"];
  27. _imageHighLight = [UIImage nim_imageInKit:@"icon_add_pressed"];
  28. break;
  29. case CardHeaderOpeatorRemove:
  30. _title = @"移除";
  31. _imageNormal = [UIImage nim_imageInKit:@"icon_remove_normal"];
  32. _imageHighLight = [UIImage nim_imageInKit:@"icon_remove_pressed"];
  33. break;
  34. default:
  35. break;
  36. }
  37. }
  38. @end