InvitationAnswerPopupView.m 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // InvitationAnswerPopupView
  3. // kneet
  4. //
  5. // Created by Jason Lee on 6/15/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "CustomLabel.h"
  10. #import "CustomCheckBox.h"
  11. #import "InvitationAnswerPopupView.h"
  12. #import "LoginModel.h"
  13. @implementation CustomDatePicker
  14. - (void)awakeFromNib {
  15. self.layer.backgroundColor = [UIColor clearColor].CGColor;
  16. }
  17. - (void)addSubview:(UIView *)view {
  18. if (!_changed) {
  19. _changed = YES;
  20. [self setValue:kUITextColor02 forKey:@"textColor"];
  21. }
  22. [super addSubview:view];
  23. }
  24. @end
  25. @interface InvitationAnswerPopupView () {
  26. }
  27. @end
  28. @implementation InvitationAnswerPopupView
  29. - (id)initFromNib {
  30. for (UIView *view in [CommonUtil nibViews:@"InvitationAnswerPopupView"]) {
  31. if ([view isKindOfClass:[InvitationAnswerPopupView class]]) {
  32. self = (InvitationAnswerPopupView *)view;
  33. //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
  34. self.frame = [UIScreen mainScreen].bounds;
  35. _datePicker.date = [NSDate date];
  36. [self.imgTitleBar setImage:[UIImage imageNamed:@"img_popup_bg_head"]inset:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  37. [self.btnConfirm setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_right"] forState:UIControlStateNormal capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  38. [self.btnConfirm setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_right_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  39. [self.btnCancel setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_left"] forState:UIControlStateNormal capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  40. [self.btnCancel setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_left_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  41. [self.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
  42. [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
  43. }
  44. }
  45. return self;
  46. }
  47. - (void)didMoveToSuperview {
  48. }
  49. - (NSString *)selectedDate {
  50. return [CommonUtil stringFromDate2:_datePicker.date];
  51. }
  52. - (void)btnConfirmTouched:(id)sender {
  53. //validate
  54. [super btnConfirmTouched:sender];
  55. }
  56. @end