单军华
2018-03-28 f99cf1d5cc50407394501853be06cb39f38a092c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
//
//  ChangeDevicePage.m
//  istanbul
//
//  Created by WindShan on 2017/6/15.
//  Copyright © 2017年 WindShan. All rights reserved.
//
 
#import "ChangeDevicePage.h"
#import "HMSegmentedControl.h"
#import "GloriaLabel.h"
#import "BaseNaviController.h"
#import "DeviceSelPage.h"
#import "DeviceSpareModel.h"
#import "Global.h"
#import "NetworkSingleton.h"
 
@interface ChangeDevicePage ()<UITableViewDelegate,UITableViewDataSource,UITextFieldDelegate>
{
    int tableViewrowCount;
    UITextField * sucessReasonTF;
    UITextField * failedReasonTF;
    NSString *    failOrSuccess; // 1 sucess 2 failed
}
@property (nonatomic, strong) HMSegmentedControl  *segmentedControl;
@property (nonatomic, strong) UITableView                   * tableView;
 
@end
 
@implementation ChangeDevicePage
 
-(void)viewWillAppear:(BOOL)animated
{
    [super viewWillAppear:YES];
    
    if( _selectedDevice != nil)
    {
        [self.tableView reloadData];
    }
}
 
-(void)viewDidDisappear:(BOOL)animated
{
    [super viewDidDisappear:YES];
    //self.navigationController.navigationBarHidden = NO;
}
 
 
-(BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
    NSInteger textLength = 0;
    
    if ([string isEqualToString:@""]) {
        textLength = textField.text.length-1;
    }
    else
    {
        textLength = textField.text.length+1;
    }
    
    return YES;
}
 
-(BOOL)textFieldShouldReturn:(UITextField *)textField
{
    if ([textField isFirstResponder])
    {
        [textField resignFirstResponder];
    }
    return YES;
}
 
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    [self textFieldShouldReturn:sucessReasonTF];
    [self textFieldShouldReturn:failedReasonTF];
}
 
 
- (UITableView *)tableView
{
    if (!_tableView)
    {
        _tableView = [[UITableView alloc] init];
        
        
        _tableView.delegate = self;
        _tableView.dataSource = self;
        //_tableView.separatorColor = [UIColor clearColor];
        _tableView.backgroundColor = [UIColor clearColor];
        //_tableView.userInteractionEnabled = NO;
        //[_tableView setSeparatorInset:UIEdgeInsetsZero];
        //[_tableView setLayoutMargins:UIEdgeInsetsZero];
        _tableView.frame = CGRectMake(0, 40, SCREEN_WIDTH, 208);
        [self.view addSubview:_tableView];
        
        [_tableView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.edges.mas_equalTo(UIEdgeInsetsMake(0 , 0, 0, 0));
        }];
        
        _tableView.tableFooterView = [UIView new];
    }
    return _tableView;
}
 
#pragma mark - UITableViewDelegate&UITableViewDataSource
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}
 
//-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
//{
//    return 0;
//}
//
-(CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
{
    return 80;
}
 
- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section   // custom view for footer. will be adjusted to default or
{
    UIView * pView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 80)];
    
    if(pView)
    {
        UIButton* changeBtn = [UIButton buttonWithType:UIButtonTypeCustom];
        changeBtn.frame = CGRectMake((SCREEN_WIDTH-350)/2, 20, 350, 40);
        
        [changeBtn setBackgroundImage:[UIImage imageNamed:@"ic_change_device_btn_bk" ] forState:UIControlStateNormal];
        [changeBtn setTitle:@"提 交" forState:UIControlStateNormal];
        changeBtn.titleLabel.font = [UIFont systemFontOfSize: 18.0];
        [changeBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
        changeBtn.layer.masksToBounds=YES;
        changeBtn.layer.cornerRadius=8.0f;
        [changeBtn addTarget:self action:@selector(changeCommitAction) forControlEvents:UIControlEventTouchUpInside];
        [pView addSubview:changeBtn];
    }
 
    
    return pView;
}
 
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return tableViewrowCount;
}
 
 
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    switch (indexPath.row) {
        case 0:
        {
             return 44;
        }
            break;
        case 1:
        {
             return 44;
        }
            break;
        case 2:
        {
             return 40;
        }
            break;
        case 3:
        {
             return 40;
        }
            break;
        case 4:
        {
            return 80;
        }
            break;
        case 5:
        {
            return 80;
        }
            break;
        default:
            break;
    }
    
    return 35;
}
 
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    
    NSString * identifier = @"changeCell";
    UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:identifier];
    if (nil == cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
        
    }
    
    //cell.delegate = self;
    //cell.selectionStyle = UITableViewCellSelectionStyleNone;
    cell.userInteractionEnabled = YES;
    
    
    switch (indexPath.row) {
        case 0:
        {
            cell.image = [UIImage imageNamed:@"ic_device_change"];
            
            GloriaLabel* deviceNameTips = [[GloriaLabel alloc] initWithFrame:CGRectMake(48, 0, (SCREEN_WIDTH-48)/2, 44)];
            deviceNameTips.font = FONT16;
            deviceNameTips.textAlignment = NSTextAlignmentLeft;
            deviceNameTips.userInteractionEnabled = NO;
            deviceNameTips.textColor = kUIColorFromRGB(0x6e6e6e);
            deviceNameTips.text = @"设备名称";
            [cell.contentView addSubview:deviceNameTips];
            
            GloriaLabel* deviceName = [[GloriaLabel alloc] initWithFrame:CGRectMake(SCREEN_WIDTH/2, 0, (SCREEN_WIDTH-48)/2, 44)];
            deviceName.font = FONT16;
            deviceName.textAlignment = NSTextAlignmentLeft;
            deviceName.userInteractionEnabled = NO;
            deviceName.textColor = kUIColorFromRGB(0x6e6e6e);
            deviceName.text = _currentModel.name;
            [cell.contentView addSubview:deviceName];
            
        }
            break;
        case 1:
        {
            cell.image = [UIImage imageNamed:@"ic_device_change"];
            GloriaLabel* hotelRoomNameTips = [[GloriaLabel alloc] initWithFrame:CGRectMake(48, 0, SCREEN_WIDTH/4, 44)];
            hotelRoomNameTips.font = FONT16;
            hotelRoomNameTips.textAlignment = NSTextAlignmentLeft;
            hotelRoomNameTips.userInteractionEnabled = NO;
            hotelRoomNameTips.textColor = kUIColorFromRGB(0x6e6e6e);
            hotelRoomNameTips.text = @"酒店房间";
            [cell.contentView addSubview:hotelRoomNameTips];
            
            GloriaLabel* hotelRoomName = [[GloriaLabel alloc] initWithFrame:CGRectMake(48+SCREEN_WIDTH/4+10, 0, SCREEN_WIDTH/3, 44)];
            hotelRoomName.font = FONT16;
            hotelRoomName.textAlignment = NSTextAlignmentLeft;
            hotelRoomName.userInteractionEnabled = NO;
            hotelRoomName.textColor = kUIColorFromRGB(0x6e6e6e);
            hotelRoomName.text = _currentModel.hotel_id.name;
            [cell.contentView addSubview:hotelRoomName];
            
            GloriaLabel* hotelRoomNo = [[GloriaLabel alloc] initWithFrame:CGRectMake((SCREEN_WIDTH*2)/3, 0, SCREEN_WIDTH/3, 44)];
            hotelRoomNo.font = FONT16;
            hotelRoomNo.textAlignment = NSTextAlignmentLeft;
            hotelRoomNo.userInteractionEnabled = NO;
            hotelRoomNo.textColor = kUIColorFromRGB(0x6e6e6e);
            hotelRoomNo.text = [NSString stringWithFormat:@"%@号房",_currentModel.room_id.name];
            [cell.contentView addSubview:hotelRoomNo];
        }
            break;
        case 2:
        {
            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
            cell.image = [UIImage imageNamed:@"ic_device_change"];
            GloriaLabel* hotelRoomNameTips = [[GloriaLabel alloc] initWithFrame:CGRectMake(48, 0, SCREEN_WIDTH-80, 44)];
            hotelRoomNameTips.font = FONT16;
            hotelRoomNameTips.textAlignment = NSTextAlignmentLeft;
            hotelRoomNameTips.userInteractionEnabled = NO;
            hotelRoomNameTips.textColor = kUIColorFromRGB(0x6e6e6e);
            hotelRoomNameTips.text = @"备用设备";
            [cell.contentView addSubview:hotelRoomNameTips];
            
            GloriaLabel* hotelRoomName = [[GloriaLabel alloc] initWithFrame:CGRectMake(48+SCREEN_WIDTH/2, 0, SCREEN_WIDTH-80, 44)];
            hotelRoomName.font = FONT16;
            hotelRoomName.textAlignment = NSTextAlignmentLeft;
            hotelRoomName.userInteractionEnabled = NO;
            hotelRoomName.textColor = kUIColorFromRGB(0x6e6e6e);
            hotelRoomName.text = _selectedDevice != nil?_selectedDevice.name:@"";
            [cell.contentView addSubview:hotelRoomName];
            
        }
            break;
        case 3:
        {
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
            if(_segmentedControl == nil)
            {
                _segmentedControl                             = [[HMSegmentedControl alloc] initWithFrame:CGRectMake(0, 0, cell.frame.size.width, cell.frame.size.height-4)];
                /*! 设置标题 */
                _segmentedControl.sectionTitles               = @[@"更换成功",@"更换失败"];
                /*! 自适应宽度,随着屏幕滑动自动滚动 */
                _segmentedControl.autoresizingMask            = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleWidth;
                /*! 默认选中第0个view */
                _segmentedControl.selectedSegmentIndex        = 0;
                /*! 标题背景颜色 */
                _segmentedControl.backgroundColor             = [UIColor clearColor];
                /*! 标题默认字体颜色 */
                _segmentedControl.titleTextAttributes         = @{NSForegroundColorAttributeName : RgbColor(25, 31, 35), NSFontAttributeName: BA_FontSize(16)};
                /*! 标题选中字体颜色 */
                _segmentedControl.selectedTitleTextAttributes = @{NSForegroundColorAttributeName : RgbColor(23, 172, 67), NSFontAttributeName: BA_FontSize(18)};
                /*! 标题选中的下划线的颜色 */
                _segmentedControl.selectionIndicatorColor     =  [UIColor clearColor];
                /*! 标题选中的下划线的高度 */
                _segmentedControl.selectionIndicatorHeight    = 1.0f;
                /*! 标题选中的样式:本样式为下划线 */
                _segmentedControl.selectionStyle              = HMSegmentedControlSelectionStyleFullWidthStripe;
                /*! 标题选中的下划线的方向:本样式为向下 */
                _segmentedControl.selectionIndicatorLocation  = HMSegmentedControlSelectionIndicatorLocationDown;
                /*! 标题的中间的隔线:默认为:NO */
                _segmentedControl.verticalDividerEnabled      = YES;
                /*! 标题的中间的隔线颜色 */
                _segmentedControl.verticalDividerColor        = RgbColor(23, 172, 67);
                /*! 标题的中间的隔线宽度 */
                _segmentedControl.verticalDividerWidth        = 1.0f;
                
                
                [cell.contentView addSubview:_segmentedControl];
                
                /*! 标题点击事件 */
                BA_WEAKSELF;
                [_segmentedControl setIndexChangeBlock:^(NSInteger index)
                 {
                     if(index == 0 )
                     {
                         tableViewrowCount = 5;
                         [weakSelf.tableView reloadData];
                          failOrSuccess = @"1";
                         //weakSelf.views1.type = @"2";
                         //[weakSelf.views1 reSetView:[UserDefault stringForKey:@"user_id"] devicetype:weakSelf.views1.type searchkey:@""];
                     }
                     else if( index == 1 )
                     {
                         failOrSuccess = @"2";
                         tableViewrowCount = 6;
                          [weakSelf.tableView reloadData];
                         //weakSelf.views2.type = @"1";
                         // [weakSelf.views2 reSetView:[UserDefault stringForKey:@"user_id"] devicetype:weakSelf.views1.type searchkey:@""];
                     }
                 }];
 
            }
        
        }
            break;
        case 4:
        {
           cell.image = [UIImage imageNamed:@"ic_device_change"];
            if(sucessReasonTF==nil)
            {
                sucessReasonTF = [[UITextField alloc] initWithFrame:CGRectMake(38, 0, SCREEN_WIDTH-48, cell.frame.size.height)];
                sucessReasonTF.font = [UIFont fontWithName:@"Arial" size:16];
                sucessReasonTF.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入更换原因"attributes:@{ NSForegroundColorAttributeName:kUIColorFromRGB(0x6e6e6e)}];
                sucessReasonTF.delegate = self;
                [sucessReasonTF setValue:kUIColorFromRGB(0x00b744) forKeyPath:@"_placeholderLabel.textColor"];
                //userPhoneTextField.layer.borderColor = [RgbColor(213, 213, 213) CGColor];
                sucessReasonTF.textColor = kUIColorFromRGB(0x00b744);
                //zhengmingNameTF.keyboardType = UIKeyboardTypeNumberPad;
                sucessReasonTF.textAlignment = NSTextAlignmentLeft;
                sucessReasonTF.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
                // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
                UIView *blankView = [[UIView alloc] initWithFrame:CGRectMake(sucessReasonTF.frame.origin.x,sucessReasonTF.frame.origin.y,10.0, sucessReasonTF.frame.size.height)];
                sucessReasonTF.leftView = blankView;
                sucessReasonTF.leftViewMode =UITextFieldViewModeAlways;
                sucessReasonTF.userInteractionEnabled = YES;
                [cell.contentView addSubview:sucessReasonTF];
            }
        }
            break;
        case 5:
        {
            cell.image = [UIImage imageNamed:@"ic_device_change"];
            if(failedReasonTF==nil)
            {
                failedReasonTF = [[UITextField alloc] initWithFrame:CGRectMake(38, 0, SCREEN_WIDTH-48, cell.frame.size.height)];
                failedReasonTF.font = [UIFont fontWithName:@"Arial" size:16];
                failedReasonTF.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入失败原因"attributes:@{ NSForegroundColorAttributeName:kUIColorFromRGB(0x6e6e6e)}];
                failedReasonTF.delegate = self;
                [failedReasonTF setValue:kUIColorFromRGB(0x00b744) forKeyPath:@"_placeholderLabel.textColor"];
                //failedReasonTF = [RgbColor(213, 213, 213) CGColor];
                failedReasonTF.textColor = kUIColorFromRGB(0x00b744);
                //failedReasonTF.keyboardType = UIKeyboardTypeNumberPad;
                failedReasonTF.textAlignment = NSTextAlignmentLeft;
                failedReasonTF.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
                // 设置一个空白blankView,15.0就是这块View的宽度width,也是光标的位置,根据你自己的需要设定大小
                UIView *blankView = [[UIView alloc] initWithFrame:CGRectMake(failedReasonTF.frame.origin.x,failedReasonTF.frame.origin.y,10.0, failedReasonTF.frame.size.height)];
                failedReasonTF.leftView = blankView;
                failedReasonTF.leftViewMode =UITextFieldViewModeAlways;
                failedReasonTF.userInteractionEnabled = YES;
                [cell.contentView addSubview:failedReasonTF];
            }
        }
            break;
        default:
            break;
    }
    
    
    
    return cell;
}
 
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    
    [self.view endEditing:YES];
    if(indexPath.row == 2)
    {
        // 跳转选择酒店
        // 更换设备
        DeviceSelPage* page = [[DeviceSelPage alloc] initIsFirstPage:NO];
        
        page.hotelid = _currentModel.hotel_id._id;
        // 跳转界面
        BaseNaviController *baseNav = [[BaseNaviController alloc] initWithRootViewController:page];
        [self presentViewController:baseNav animated:YES completion:nil];
    }
}
 
#pragma mark - 补全分隔线左侧缺失
- (void)viewDidLayoutSubviews {
    if ([self.tableView respondsToSelector:@selector(setSeparatorInset:)]) {
        [self.tableView setSeparatorInset:UIEdgeInsetsZero];
        
    }
    if ([self.tableView respondsToSelector:@selector(setLayoutMargins:)])  {
        [self.tableView setLayoutMargins:UIEdgeInsetsZero];
    }
}
 
 
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPat{
    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
        [cell setLayoutMargins:UIEdgeInsetsZero];
    }
    if ([cell respondsToSelector:@selector(setSeparatorInset:)]){
        [cell setSeparatorInset:UIEdgeInsetsZero];
    }
}
 
- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.navigationItem.title = @"更换设备";
    [self setNavigationLeft:@"返回" sel:@selector(backAction)];
    
    //self.segmentedControl.hidden = NO;
    tableViewrowCount = 5;
    failOrSuccess = @"1";
    self.tableView.hidden = NO;
    // Do any additional setup after loading the view.
}
 
-(void)backAction
{
    [self dismissViewControllerAnimated:YES completion:nil];
}
 
-(void)changeCommitAction
{
    if(failedReasonTF.text.length == 0 && [failOrSuccess intValue] == 2)
    {
        [Global alertMessageEx:@"请输入失败原因." title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
        return;
    }
   
    if(sucessReasonTF.text.length == 0 )
    {
        [Global alertMessageEx:@"请输入更换原因." title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
        return;
    }
    
    if(_selectedDevice == nil )
    {
        [Global alertMessageEx:@"请选择备用设备." title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
        return;
    }
 
    //[UserDefault stringForKey:@"user_id"]
    NSString *path = [[NSString alloc] initWithFormat:CHANGE_DEVICE];
    
    //params.put("userID", MainApp.userId);
    //params.put("deviceID", TextUtils.isEmpty(deviceID)?"":deviceID);
    //params.put("roomID", TextUtils.isEmpty(roomID)?"":roomID);
    //params.put("hotelID", TextUtils.isEmpty(hotelID)?"":hotelID);
    //params.put("spareID", TextUtils.isEmpty(spareId)?"":spareId);
    //params.put("reason", TextUtils.isEmpty(reason)?"":reason);
    //params.put("result", result+"");
    //params.put("fail", TextUtils.isEmpty(fail)?"":fail);
    
    NSMutableDictionary *param = [[NSMutableDictionary alloc] init];
    
    [param setObject:[UserDefault stringForKey:@"user_id"] forKey:@"userID"];
    [param setObject:_currentModel._id forKey:@"deviceID"];
    [param setObject:_currentModel.room_id._id forKey:@"roomID"];
    [param setObject:_currentModel.hotel_id._id forKey:@"hotelID"];
    [param setObject:_selectedDevice._id forKey:@"spareID"];
    [param setObject:sucessReasonTF.text forKey:@"reason"];
    [param setObject:failOrSuccess forKey:@"result"];
    [param setObject:[failOrSuccess intValue] == 2?failedReasonTF.text:@"" forKey:@"fail"];
    
    
    MPWeakSelf(self);
    [NetworkSingleton networkingPostMethod:param urlName:path success:^(id responseBody)
     {
         MPStrongSelf(self);
         BaseResModel * resModel = [Global toBaseModel:responseBody];
         
         if(resModel.code == 0)
         {
             //发送成功提示
            [Global alertMessageEx:resModel.desc title:@"成功信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
            [self dismissViewControllerAnimated:YES completion:nil];
         }
         else
         {
             [Global alertMessageEx:resModel.desc title:@"提示信息" okTtitle:nil cancelTitle:@"OK" delegate:self];
         }
     }
    failure:^(NSString *error)
     {
         [Global alertMessageEx:error title:@"获取失败" okTtitle:nil cancelTitle:@"OK" delegate:self];
     }];
}
 
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
 
/*
#pragma mark - Navigation
 
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
 
@end