NoContentView.m 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // NoContentView.m
  3. // kneet
  4. //
  5. // Created by Jason Lee on 06/03/15.
  6. // Copyright (c) 2015 ncomz. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "NoContentView.h"
  10. #import "CustomLabel.h"
  11. @interface NoContentView () {
  12. KNMenuId _menuId;
  13. }
  14. @end
  15. @implementation NoContentView
  16. + (id)viewFromNib {
  17. NoContentView *noContentView = nil;
  18. for (UIView *view in [CommonUtil nibViews:@"NoContentView"]) {
  19. if ([view isKindOfClass:[NoContentView class]]) {
  20. noContentView = (NoContentView*)view;
  21. noContentView.backgroundColor = [UIColor clearColor];
  22. noContentView.lblTitle.text = NSLocalizedString(@"죄송합니다\n현재 항목의 리스트가 존재하지 않습니다", @"죄송합니다\n현재 항목의 리스트가 존재하지 않습니다");
  23. }
  24. }
  25. return noContentView;
  26. }
  27. - (void)setText:(NSString *)text {
  28. _lblTitle.text = text;
  29. // CGFloat height = [CommonUtil getLabelRealHeight:_lblTitle];
  30. // _constraintLabelHeight.constant = height;
  31. }
  32. - (void)setLink:(NSString *)link wishMenuId:(KNMenuId)menuId {
  33. _menuId = menuId;
  34. [_lblTitle setLink:link];
  35. [_lblTitle addTarget:self action:@selector(gotoLink:)];
  36. }
  37. - (void)gotoLink:(id)sender {
  38. [[JDFacade facade] gotoWishMenu:_menuId];
  39. }
  40. @end