ConditionSelectPopupView.m 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // ConditionSelectPopupView.m
  3. // OneCable
  4. //
  5. // Created by nComz on 2017. 5. 18..
  6. // Copyright © 2017년 ntels. All rights reserved.
  7. //
  8. #import "ConditionSelectPopupView.h"
  9. #import "CustomLabel.h"
  10. #import "CustomButton.h"
  11. @interface ConditionSelectPopupView ()
  12. @end
  13. @implementation ConditionSelectPopupView
  14. - (id)initFromNib {
  15. for (UIView *view in [CommonUtil nibViews:@"ConditionSelectPopupView"]) {
  16. if ([view isKindOfClass:[ConditionSelectPopupView class]]) {
  17. self = (ConditionSelectPopupView *)view;
  18. //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
  19. self.frame = [UIScreen mainScreen].bounds;
  20. [self.imgTitleBar setImage:[UIImage imageNamed:@"img_popup_bg_head"]inset:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  21. [self.btnCancelSingle setBackgroundImage:[UIImage imageNamed:@"img_popup_btn"] forState:UIControlStateNormal capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  22. [self.btnCancelSingle setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  23. //Localization
  24. [self.btnCancelSingle setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
  25. }
  26. }
  27. return self;
  28. }
  29. - (void)didMoveToSuperview {
  30. }
  31. - (IBAction)btnHomeModeTouched:(id)sender {
  32. self.btnHomeMode.selected = YES;
  33. self.btnTerm.selected = NO;
  34. self.btnStatus.selected = NO;
  35. [super hideWithButtonIndex:10];
  36. }
  37. - (IBAction)btnTermTouched:(id)sender {
  38. self.btnHomeMode.selected = NO;
  39. self.btnTerm.selected = YES;
  40. self.btnStatus.selected = NO;
  41. [super hideWithButtonIndex:11];
  42. }
  43. - (IBAction)btnStatusTouched:(id)sender {
  44. self.btnHomeMode.selected = NO;
  45. self.btnTerm.selected = NO;
  46. self.btnStatus.selected = YES;
  47. [super hideWithButtonIndex:12];
  48. }
  49. - (IBAction)btnCancelTouched:(id)sender {
  50. [super btnCancelTouched:nil];
  51. }
  52. @end