InvitationAnswerPopupView.m 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
  37. [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
  38. }
  39. }
  40. return self;
  41. }
  42. - (void)didMoveToSuperview {
  43. }
  44. - (NSString *)selectedDate {
  45. return [CommonUtil stringFromDate2:_datePicker.date];
  46. }
  47. - (void)btnConfirmTouched:(id)sender {
  48. //validate
  49. [super btnConfirmTouched:sender];
  50. }
  51. @end