ChangePhotoPopupView.m 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. //
  2. // ChangePhotoPopupView.m
  3. // OneCable
  4. //
  5. // Created by nComz on 2017. 4. 26..
  6. // Copyright © 2017년 ntels. All rights reserved.
  7. //
  8. #import "ImageUtil.h"
  9. #import "ChangePhotoPopupView.h"
  10. #import "JDFacade.h"
  11. #import "RequestHandler.h"
  12. @interface ChangePhotoPopupView ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate> {
  13. UIViewController *_presentedViewController;
  14. UIImagePickerController *_imagePickerController;
  15. }
  16. @end
  17. @implementation ChangePhotoPopupView
  18. - (id)initFromNib {
  19. for (UIView *view in [CommonUtil nibViews:@"ChangePhotoPopupView"]) {
  20. if ([view isKindOfClass:[ChangePhotoPopupView class]]) {
  21. self = (ChangePhotoPopupView *)view;
  22. //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
  23. self.frame = [UIScreen mainScreen].bounds;
  24. self.lblTitle.text = NSLocalizedString(@"사진 선택", @"사진 선택");
  25. [self.imgTitleBar setImage:[UIImage imageNamed:@"img_popup_bg_head"]inset:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  26. [self.btnCancelSingle setBackgroundImage:[UIImage imageNamed:@"img_popup_btn"] forState:UIControlStateNormal capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  27. [self.btnCancelSingle setBackgroundImage:[UIImage imageNamed:@"img_popup_btn_press"] forState:UIControlStateHighlighted capInsets:UIEdgeInsetsMake(kfTopInset,kfRightInset,kfBottomInset,kfLeftInset)];
  28. //Localization
  29. [self.btnCancelSingle setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
  30. }
  31. }
  32. return self;
  33. }
  34. - (IBAction)btnPhotoSelectTouched:(id)sender {
  35. [self.delegate changeSelectPhotoType:0];
  36. [super btnCancelTouched:nil];
  37. }
  38. - (IBAction)btnTakePhotoTouched:(id)sender {
  39. [self.delegate changeSelectPhotoType:1];
  40. [super btnCancelTouched:nil];
  41. }
  42. - (IBAction)btnPhotoDeleteTouched:(id)sender {
  43. [self.delegate changeSelectPhotoType:2];
  44. [super btnCancelTouched:nil];
  45. }
  46. - (IBAction)btnCancelTouched:(id)sender {
  47. [super btnCancelTouched:nil];
  48. }
  49. @end