SettingsViewController.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543
  1. //
  2. // SettingsViewController.m
  3. // kneet2
  4. //
  5. // Created by Jason Lee on 10/8/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "RequestHandler.h"
  10. #import "CustomLabel.h"
  11. #import "CustomButton.h"
  12. #import "CustomCheckBox.h"
  13. #import "UIButton+WebCache.h"
  14. #import "CustomTableView.h"
  15. #import "WebBrowseViewController.h"
  16. #import "PwdPopupView.h"
  17. #import "ImageUtil.h"
  18. #import "SettingsViewController.h"
  19. #import "AdminAuthPopupView.h"
  20. #import "DeleteAccountPopupView.h"
  21. #import "ChangeNamePopupView.h"
  22. #import "ConfirmPasswdPopupView.h"
  23. #import "ChangeEmailPopupView.h"
  24. #import "ChangePhotoPopupView.h"
  25. #import "ManagementViewController.h"
  26. #define kiAccountCellHeight 555
  27. #define kiNotiCellHeight 137
  28. #define kiServiceCellHeight 143
  29. #define kiVersionCellHeight 103
  30. #define kiDeleteCellHeight 82
  31. //#define kiPasswdCellHeight 135
  32. #define kiPhotoAlbum 0
  33. #define kiPhotoCamera 1
  34. #define kiPhotoDelete 2
  35. @implementation SettingsAccountTableViewCell
  36. - (void)awakeFromNib {
  37. }
  38. - (void)didMoveToSuperview {
  39. // [_lblChangeNickname setUnderLine:_lblChangeNickname.text];
  40. // [_lblChangePassword setUnderLine:_lblChangePassword.text];
  41. // [_lblChangeEmail setUnderLine:_lblChangeEmail.text];
  42. // [_lblChangePassword setHidden:NO];
  43. [_lblChangeEmail setHidden:YES];
  44. [_lblEmailWaiting setHidden:YES];
  45. _contraintEmailChangeBottom.constant = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 18 : 45;
  46. _lblEmailWaiting.hidden = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString];
  47. [self layoutIfNeeded];
  48. }
  49. @end
  50. @implementation SettingsNotificationTableViewCell
  51. @end
  52. @implementation SettingsServiceTableViewCell
  53. - (void)didMoveToSuperview {
  54. }
  55. @end
  56. @implementation SettingsVersionTableViewCell
  57. @end
  58. @implementation SettingsDeleteTableViewCell
  59. @end
  60. //@implementation SettingsPasswdTableViewCell
  61. //
  62. //@end
  63. @interface SettingsViewController () <UITableViewDataSource, UITableViewDelegate, ImageUtilDelegate,changePhotoDelegate> {
  64. CustomCheckBox *_chkAutoLogin, *_chkHomeModeChange, *_chkHomeEmptyChange;
  65. CustomButton *_btnProfile;
  66. BOOL _isNotFirstLoading;
  67. DashboardModel *_dashboard;
  68. ImageUtil *_imageUtil;
  69. }
  70. @end
  71. #pragma mark - Class Definition
  72. @implementation SettingsViewController
  73. @synthesize dashboardModel;
  74. - (void)viewDidLoad {
  75. [super viewDidLoad];
  76. // Do any additional setup after loading the view.
  77. [self initUI];
  78. [self prepareViewDidLoad];
  79. }
  80. - (void)viewWillAppear:(BOOL)animated {
  81. [_tableView reloadData];
  82. [super viewWillAppear:animated];
  83. }
  84. - (void)initUI {
  85. [self.navigationController.navigationBar setHidden:YES];
  86. self.navigationController.interactivePopGestureRecognizer.enabled = NO;
  87. //set tableview option
  88. [self initTableViewAsDefaultStyle:_tableView];
  89. }
  90. - (void)prepareViewDidLoad {
  91. }
  92. #pragma mark - Main Logic
  93. - (void)requestUpdatePushSetting:(NSDictionary *)parameter {
  94. //parameters
  95. NSString *path = [NSString stringWithFormat:API_POST_PUSH_SETTINGS];
  96. [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[JDJSONModel class] completion:^(id responseObject) {
  97. NSString *msg = nil;
  98. if ([parameter hasKey:@"push_type_mode_chg_yn"]) {
  99. BOOL isNotifyHomeModeChange = [[parameter valueForKey:@"push_type_mode_chg_yn"] boolValue];
  100. if ([[JDFacade facade].loginUser.pushTypeModeChgYn boolValue] != isNotifyHomeModeChange) {
  101. msg = isNotifyHomeModeChange ? @"지금부터 홈모드가 바뀔 때\n푸시 알림을 받습니다" : @"홈모드 변경 알림을 해제합니다";
  102. [JDFacade facade].loginUser.pushTypeModeChgYn = [parameter valueForKey:@"push_type_mode_chg_yn"];
  103. }
  104. } else if ([parameter hasKey:@"push_type_prsnc_chg_yn"]) {//와이파이,
  105. BOOL isNotifyExecutingRules = [[parameter valueForKey:@"push_type_prsnc_chg_yn"] boolValue];
  106. if ([[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue] != isNotifyExecutingRules) {
  107. msg = isNotifyExecutingRules ? @"지금부터 집이 빌 때\n푸시 알림을 받습니다" : @"빈 집 알림을 해제합니다";
  108. [JDFacade facade].loginUser.pushTypePrsncChgYn = [parameter valueForKey:@"push_type_prsnc_chg_yn"];
  109. }
  110. }
  111. [[JDFacade facade] toast:msg];
  112. } failure:^(id errorObject) {
  113. JDErrorModel *error = (JDErrorModel *)errorObject;
  114. [[JDFacade facade] alert:error.errorMessage];
  115. }];
  116. }
  117. - (void)requestUpdateProfileImage:(UIImage *)profileImage {
  118. NSDictionary *parameter;
  119. if (profileImage == nil) { // 사진 삭제
  120. parameter = @{@"image_file": @""};
  121. } else {
  122. parameter = @{@"image_file": profileImage};
  123. }
  124. //parameters
  125. // NSDictionary *parameter = @{@"image_file": profileImage};
  126. // NSString *path = [NSString stringWithFormat:API_POST_MEMBER_UPDATE_IMAGE];
  127. NSString *path = [[JDFacade facade] getUrlWithCustGroupIDAndMemberID:API_POST_MEMBER_UPDATE_IMAGE];
  128. [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[LoginModel class] completion:^(id responseObject) {
  129. if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
  130. return;
  131. }
  132. LoginModel *response = (LoginModel *) responseObject;
  133. NSLog(@"responseObject : %@",responseObject);
  134. if (response) {//API 성공
  135. if ([response.imageFile containsString:@"/upload"]) {
  136. [_btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:response.imageFile] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
  137. [[JDFacade facade] toast:@"프로필 이미지를 변경했습니다"];
  138. } else {
  139. NSString *msg = @"사진이 삭제 되었습니다.";
  140. [[JDFacade facade] alertTitle:@"알림" message: msg completionHander:nil];
  141. [_btnProfile setBackgroundImage:[UIImage imageNamed:@"img_member_photo_default"] forState:UIControlStateNormal];
  142. }
  143. }
  144. } failure:^(id errorObject) {
  145. JDErrorModel *error = (JDErrorModel *)errorObject;
  146. [[JDFacade facade] alert:error.errorMessage];
  147. }];
  148. }
  149. #pragma mark - UITableView DataSource & Delegate
  150. #pragma mark - UITableView DataSource & Delegate
  151. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  152. return 5;
  153. }
  154. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  155. return 1;
  156. }
  157. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  158. CGFloat height = 0.0f;
  159. if (indexPath.section == 0) {
  160. // height = ![JDFacade facade].tmpEmailId || [[JDFacade facade].tmpEmailId isEmptyString] ? 331-27 : 331;
  161. height = kiAccountCellHeight;
  162. } else if (indexPath.section == 1) {//notification view
  163. // height = [JDFacade facade].loginUser.isHomehubOnline ? 317-56 : 317;
  164. height = kiNotiCellHeight;
  165. } else if (indexPath.section == 2) {
  166. height = kiServiceCellHeight;
  167. } else if (indexPath.section == 3) {
  168. height = kiVersionCellHeight;
  169. } else if (indexPath.section == 4) {
  170. height = kiDeleteCellHeight;
  171. }
  172. // else if (indexPath.section == 5) {
  173. // height = kiPasswdCellHeight;
  174. // }
  175. return height;
  176. }
  177. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  178. UITableViewCell *cell = nil;//[super tableView:tableView cellForRowAtIndexPath:indexPath];
  179. if (indexPath.section == 0) {//account cell
  180. SettingsAccountTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"AccountCellIdentifier"];
  181. tcell.lblNickname.text = [[JDFacade facade].loginUser.nickname isEqualToString:@""] ? @"사용자 이름을 등록해주세요.":[JDFacade facade].loginUser.nickname;
  182. tcell.lblEmail.text = [JDFacade facade].loginUser.memberId;
  183. if (!_btnProfile) {
  184. _btnProfile = tcell.btnProfile;
  185. }
  186. // if ([[JDFacade facade].loginUser.profileImage isEqualToString:@""]) {
  187. // [_btnProfile setBackgroundImage:[UIImage imageNamed:@"img_member_photo_default"] forState:UIControlStateNormal];
  188. // } else {
  189. [_btnProfile sd_setBackgroundImageWithURL:[NSURL URLWithString:[JDFacade facade].loginUser.imageFile] forState:UIControlStateNormal placeholderImage:nil options:SDWebImageRefreshCached];
  190. // }
  191. tcell.lblPhoneNum.text = [CommonUtil formattedPhoneNumber:[JDFacade facade].loginUser.phone];
  192. //set checkbox
  193. if (!_chkAutoLogin) {
  194. _chkAutoLogin = tcell.chkAutoLogin;
  195. _chkAutoLogin.checked = [[[JDFacade facade] objectForKeyFromUserDefaults:USDEF_APP_AUTO_LOGIN] boolValue];
  196. }
  197. //set checkbox action
  198. if (![_chkAutoLogin actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  199. [_chkAutoLogin addTarget:self action:@selector(chkAutoLoginTouched:) forControlEvents:UIControlEventTouchUpInside];
  200. }
  201. //set label action
  202. if (!tcell.lblChangeNickname.touchHandler) {
  203. [tcell.lblChangeNickname addTouchEventHandler:^(id label) {
  204. [self lblChangeNicknameTouched];
  205. }];
  206. }
  207. //set label action
  208. if (!tcell.lblChangePassword.touchHandler) {
  209. [tcell.lblChangePassword addTouchEventHandler:^(id label) {
  210. [self lblChangePasswordTouched];
  211. }];
  212. }
  213. //set email change action
  214. if (!tcell.lblChangeEmail.touchHandler) {
  215. [tcell.lblChangeEmail addTouchEventHandler:^(id label) {
  216. [self lblChangeEmailTouched];
  217. }];
  218. }
  219. //set Phone Number change action
  220. if (![tcell.btnChangeNum actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  221. [tcell.btnChangeNum addTarget:self action:@selector(btnChangeNumTouched:) forControlEvents:UIControlEventTouchUpInside];
  222. }
  223. if (![tcell.btnLogout actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  224. [tcell.btnLogout addTarget:self action:@selector(btnLogoutTouched:) forControlEvents:UIControlEventTouchUpInside];
  225. }
  226. if (![tcell.btnProfile actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {//set button target
  227. [tcell.btnProfile addTarget:self action:@selector(btnProfileTouched:) forControlEvents:UIControlEventTouchUpInside];
  228. }
  229. if (![tcell.btnProfileSetting actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  230. [tcell.btnProfileSetting addTarget:self action:@selector(btnProfileTouched:) forControlEvents:UIControlEventTouchUpInside];
  231. }
  232. cell = tcell;
  233. } else if (indexPath.section == 1) {//notification cell
  234. SettingsNotificationTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"NotificationCellIdentifier"];
  235. if ([JDFacade facade].loginUser.level < 90) {
  236. tcell.viewThingsSet.hidden = YES;
  237. } else {
  238. tcell.viewThingsSet.hidden = NO;
  239. }
  240. if (!_chkHomeModeChange) {
  241. _chkHomeModeChange = tcell.chkHomeModeChange;
  242. }
  243. // if (!_chkHomeEmptyChange) {
  244. // _chkHomeEmptyChange = tcell.chkHomeEmptyChange;
  245. // }
  246. if (!_isNotFirstLoading) {
  247. _isNotFirstLoading = YES;
  248. _chkHomeModeChange.checked = [[JDFacade facade].loginUser.pushTypeModeChgYn boolValue];
  249. // _chkHomeEmptyChange.checked = [[JDFacade facade].loginUser.pushTypePrsncChgYn boolValue];
  250. }
  251. if (![tcell.chkHomeModeChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  252. [tcell.chkHomeModeChange addTarget:self action:@selector(chkHomeModeChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
  253. }
  254. if (![tcell.btnThingsSet actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  255. [tcell.btnThingsSet addTarget:self action:@selector(btnThingsSetTouched:) forControlEvents:UIControlEventTouchUpInside];
  256. }
  257. // if (![tcell.chkHomeEmptyChange actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  258. // [tcell.chkHomeEmptyChange addTarget:self action:@selector(chkHomeEmptyChangeTouched:) forControlEvents:UIControlEventTouchUpInside];
  259. // }
  260. // tcell.homehubInfoView.hidden = [JDFacade facade].loginUser.isHomehubOnline;
  261. // if (tcell.homehubInfoView.hidden) {
  262. // tcell.constraintHomehubInfoViewHeight.constant = 0;
  263. // } else {
  264. // _chkHomeModeChange.enabled = NO;
  265. // _chkHomeEmptyChange.enabled = NO;
  266. // }
  267. cell = tcell;
  268. } else if (indexPath.section == 2) {//service info cell
  269. SettingsServiceTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"ServiceCellIdentifier"];
  270. if (![tcell.btnService actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  271. [tcell.btnService addTarget:self action:@selector(btnServiceTouched:) forControlEvents:UIControlEventTouchUpInside];
  272. }
  273. if (![tcell.btnPolicy actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  274. [tcell.btnPolicy addTarget:self action:@selector(btnPolicyTouched:) forControlEvents:UIControlEventTouchUpInside];
  275. }
  276. cell = tcell;
  277. } else if (indexPath.section == 3) {//version info cell
  278. SettingsVersionTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"VersionCellIdentifier"];
  279. tcell.lblVersion.text = [NSString stringWithFormat:@"현재 버전 : %@", [CommonUtil applicationVersion]];
  280. cell = tcell;
  281. } else if (indexPath.section == 4) {//Delete cell
  282. SettingsDeleteTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"DeleteCellIdentifier"];
  283. if (![tcell.btnDelete actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  284. [tcell.btnDelete addTarget:self action:@selector(btnDeleteTouched:) forControlEvents:UIControlEventTouchUpInside];
  285. }
  286. cell = tcell;
  287. }
  288. // else if (indexPath.section == 5) {//Passwd info cell
  289. // SettingsPasswdTableViewCell *tcell = [_tableView dequeueReusableCellWithIdentifier:@"PasswdCellIdentifier"];
  290. //
  291. // if (![tcell.btnPassword actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
  292. // [tcell.btnPassword addTarget:self action:@selector(btnPasswordTouched:) forControlEvents:UIControlEventTouchUpInside];
  293. // }
  294. //
  295. // cell = tcell;
  296. // }
  297. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  298. return cell;
  299. }
  300. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  301. [super tableView:tableView didSelectRowAtIndexPath:indexPath];
  302. }
  303. #pragma mark - ImageUtil Delegate
  304. - (void)didFinishPickingImage:(UIImage *)image {
  305. [self requestUpdateProfileImage:image];
  306. }
  307. #pragma mark - UI Events
  308. - (void)lblChangeNicknameTouched {
  309. // ChangeNamePopupView *popup = [[ChangeNamePopupView alloc] initFromNib];
  310. // [popup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
  311. // if (buttonIndex == 0) {//이름 변경 시,
  312. //
  313. // [_tableView reloadData];
  314. // }
  315. // }];
  316. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsNameSetViewController" storyboardName:@"Settings"];
  317. // vc.providesPresentationContextTransitionStyle = YES;
  318. // vc.definesPresentationContext = YES;
  319. //
  320. // [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
  321. //
  322. // [self presentViewController:vc animated:YES completion:nil];
  323. [self.navigationController pushViewController:vc animated:YES];
  324. }
  325. - (void)lblChangePasswordTouched {
  326. // ConfirmPasswdPopupView *popup = [[ConfirmPasswdPopupView alloc] initFromNib];
  327. // [popup show];
  328. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsPasswdInputViewController" storyboardName:@"Settings"];
  329. [self.navigationController pushViewController:vc animated:YES];
  330. }
  331. - (void)lblChangeEmailTouched {
  332. ChangeEmailPopupView *popup = [[ChangeEmailPopupView alloc] initFromNib];
  333. [popup show];
  334. }
  335. - (void)btnProfileTouched:(id)sender {
  336. if (!_imageUtil) {
  337. _imageUtil = [[ImageUtil alloc] init];
  338. _imageUtil.delegate = self;
  339. }
  340. // [_imageUtil prepareImagePicker:self];
  341. ChangePhotoPopupView *popup = [[ChangePhotoPopupView alloc]initFromNib];
  342. [popup show];
  343. popup.delegate = self;
  344. }
  345. -(void)changeSelectPhotoType:(NSInteger)index{
  346. [_imageUtil setPresentViewController:self];
  347. if (index == kiPhotoAlbum) {
  348. [_imageUtil showImagePickerController:UIImagePickerControllerSourceTypeSavedPhotosAlbum];
  349. } else if (index == kiPhotoCamera){
  350. [_imageUtil showImagePickerController:UIImagePickerControllerSourceTypeCamera];
  351. } else if (index == kiPhotoDelete){
  352. // UIImage *image = [[UIImage alloc]init];
  353. [self requestUpdateProfileImage:[UIImage imageNamed:@""]];
  354. }
  355. }
  356. - (void)chkAutoLoginTouched:(id)sender {
  357. [[JDFacade facade] storeObjectToUserDefaults:@(_chkAutoLogin.checked) forKey:USDEF_APP_AUTO_LOGIN];
  358. if (_chkAutoLogin.checked) {//자동로그인 설정 시, 인증 토큰 저장
  359. [[JDFacade facade] storeObjectToKeychain:[JDFacade facade].loginUser.authToken forKey:USDEF_SESSION_AUTOTOKEN];
  360. } else {;
  361. [[JDFacade facade] removeObjectAtKeychain:USDEF_SESSION_AUTOTOKEN];
  362. }
  363. }
  364. - (void)btnLogoutTouched:(id)sender {
  365. [[JDFacade facade] logout];
  366. }
  367. - (void)btnChangeNumTouched:(id)sender {
  368. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"SettingsNumChangeViewController" storyboardName:@"Settings"];
  369. [self.navigationController pushViewController:vc animated:YES];
  370. }
  371. //NoticationcationCell's action
  372. - (void)chkHomeModeChangeTouched:(id)sender {
  373. NSDictionary *parameter = @{@"push_type_mode_chg_yn" : _chkHomeModeChange.checked ? ksYES : ksNO};
  374. [self requestUpdatePushSetting:parameter];
  375. }
  376. //- (void)chkHomeEmptyChangeTouched:(id)sender {
  377. //
  378. // NSDictionary *parameter = @{@"push_type_prsnc_chg_yn" : _chkHomeEmptyChange.checked ? ksYES : ksNO};
  379. // [self requestUpdatePushSetting:parameter];
  380. //}
  381. - (void)btnThingsSetTouched:(id)sender{
  382. NSLog(@"홈모드별 동작할 장치 설정");
  383. }
  384. - (void)btnServiceTouched:(id)sender {
  385. NSString *URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_TERMS];
  386. [[JDFacade facade] loadURLExternalBrowser:URLString];
  387. }
  388. - (void)btnPolicyTouched:(id)sender {
  389. NSString *URLString = [NSString stringWithFormat:@"%@%@", kWebLinkServer, URL_PATH_POLICY];
  390. [[JDFacade facade] loadURLExternalBrowser:URLString];
  391. }
  392. //service passwd cell's action
  393. - (void)btnPasswordTouched:(id)sender {// 셋탑 설정
  394. AdminAuthPopupView *popup = [[AdminAuthPopupView alloc] initFromNib];
  395. [popup show];
  396. }
  397. - (void)btnDeleteTouched:(id)sender { // 계정 삭제
  398. DeleteAccountPopupView *popup = [[DeleteAccountPopupView alloc]initFromNib];
  399. [popup show];
  400. }
  401. - (IBAction)btnCloseTouched:(id)sender {
  402. [self dismissViewControllerAnimated:YES completion:nil];
  403. }
  404. #pragma mark - MemoryWarning
  405. - (void)didReceiveMemoryWarning
  406. {
  407. [super didReceiveMemoryWarning];
  408. // Dispose of any resources that can be recreated.
  409. }
  410. @end