| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- //
- // ThingsAddCompleteViewController.m
- //
- //
- // Created by Jason Lee on 11/13/15.
- //
- //
- #import "ThingsAddCompleteViewController.h"
- #import "ChangeDeviceNamePopupView.h"
- @interface ThingsAddCompleteViewController () {
- }
- @end
- #pragma mark - Class Definition
- @implementation ThingsAddCompleteViewController
- @synthesize deviceDetailModel;
- - (void)viewDidLoad {
- [super viewDidLoad];
- // Do any additional setup after loading the view.
-
- [self initUI];
- [self prepareViewDidLoad];
- }
- - (void)initUI {
-
- _btnChange.enabled = NO;
-
-
- if (_isDeleteMode) {
- _lblTitle.text = @"삭제 성공";
- _lblDesc.text = @"장치를 삭제했습니다";
- }
- }
- - (void)viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
- [UIView animateWithDuration:kfAnimationDur animations:^{
- _maskView.alpha = 0.7;
- } completion:^(BOOL finished) {
-
- _constraintPopViewTop.constant = (IPHONE_HEIGHT - _popView.height) / 2;
-
- [UIView animateWithDuration:kfAnimationDur animations:^{
- [self.view layoutIfNeeded];
- }];
- }];
- }
- - (void)prepareViewDidLoad {
-
- }
- #pragma mark - UI Events
- // 나중에 변경
- - (IBAction)btnCompleteTouched:(id)sender {
-
- [[JDFacade facade] dismissModalStack:YES completion:^{
- [[JDFacade facade] gotoWishMenu:KNMenuIdThings];
- }];
- }
- // 이름 변경
- - (IBAction)btnChangeTouched:(id)sender {
- ChangeDeviceNamePopupView *popup = [[ChangeDeviceNamePopupView alloc]initFromNib:deviceDetailModel];
- popup.deviceDetailModel = deviceDetailModel;
- [popup show];
- }
- -(void)receiveSocketData:(NSNotification *)notification
- {
- _btnChange.enabled = YES;
-
- deviceDetailModel = [[DeviceDetailModel alloc] initWithDictionary:notification.object error:nil];
- }
- #pragma mark - MemoryWarning
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- @end
|