ConditionSelectPopupView.m 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. }
  36. - (IBAction)btnTermTouched:(id)sender {
  37. self.btnHomeMode.selected = NO;
  38. self.btnTerm.selected = YES;
  39. self.btnStatus.selected = NO;
  40. }
  41. - (IBAction)btnStatusTouched:(id)sender {
  42. self.btnHomeMode.selected = NO;
  43. self.btnTerm.selected = NO;
  44. self.btnStatus.selected = YES;
  45. }
  46. - (IBAction)btnCancelTouched:(id)sender {
  47. [super btnCancelTouched:nil];
  48. }
  49. @end