-
Notifications
You must be signed in to change notification settings - Fork 0
/
LifeScreenDetailNew.m
461 lines (386 loc) · 21.9 KB
/
LifeScreenDetailNew.m
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
//
// LifeScreenDetailNew.m
// Dream_iOS
//
// Created by Ma Sunghoon on 2014. 1. 24..
// Copyright (c) 2014년 Ma Sunghoon. All rights reserved.
//
#import "API.h"
#import "LifeScreenDetailNew.h"
#import "LifeScreenDetailCell.h"
#import "LifeScreenDescAdd.h"
#import "LifeScreenAdd.h"
#import "LifeScreenRptAdd.h"
#import "UIAlertView+error.h"
@interface LifeScreenDetailNew ()
@property (nonatomic) NSInteger isPriv;
@property (nonatomic) NSMutableArray *bucketDescSize;
@end
@implementation LifeScreenDetailNew
@synthesize bucket;
@synthesize bucketDetailList;
@synthesize bucketDetailListMeta;
@synthesize bucketDescSize;
@synthesize addSubBucketBtn;
- (id)initWithStyle:(UITableViewStyle)style
{
self = [super initWithStyle:style];
if (self) {
// Custom initialization
}
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
bucketDetailList = [NSMutableArray arrayWithCapacity:0];
bucketDetailListMeta = [NSMutableArray arrayWithCapacity:0];
NSMutableDictionary *tmpDic = [[NSMutableDictionary alloc] init];
// for(NSString *key in bucket){
// if([key isEqualToString:@"subBuckets"]){
// [bucketDetailList addObjectsFromArray:[bucket objectForKey:key]];
// } else {
// [tmpDic setValue:[bucket objectForKey:key] forKey:key];
// }
// }
// [bucketDetailList addObject:tmpDic];
for(NSString *key in bucket){
if(![key isEqualToString:@"subBuckets"]){
[tmpDic setValue:[bucket objectForKey:key] forKey:key];
}
}
[bucketDetailList addObject:tmpDic];
for(int i=0; i< [[bucket objectForKey:@"subBuckets"] count]; i++){
NSMutableDictionary *tmpDic2 = [[NSMutableDictionary alloc] init];
for(NSString *key in [[bucket objectForKey:@"subBuckets"] objectAtIndex:i])
if(![key isEqualToString:@"subBuckets"]){
[tmpDic2 setValue:[[[bucket objectForKey:@"subBuckets"] objectAtIndex:i] objectForKey:key] forKey:key];
}
[bucketDetailList addObject:tmpDic2];
}
[self sortBucketDetailList];
// Uncomment the following line to preserve selection between presentations.
// self.clearsSelectionOnViewWillAppear = NO;
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
#pragma mark - Table view data source
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [bucketDetailList count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"LifeScreenDetailCell";
LifeScreenDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// NSMutableDictionary *bucket = nil;
// bucket = [bucketDetailList objectAtIndex:indexPath.row];
// Configure the cell...
#pragma mark - Affect to all type of Buckets
[cell setIndex:indexPath.row];
[[cell bucketTitle] setText:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"title"]];
[[cell bucketDue] setText:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"deadline"]];
[[cell bucketLevel] setText:[NSString stringWithFormat:@"LV.%d",[[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"level"] intValue]+1]];
if([[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] == [NSNull null] || [[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] isEqualToString:@""]){
[cell bucketDescView].hidden = YES;
} else {
[cell bucketDescView].hidden = NO;
[cell bucketDescBtn].enabled = NO;
NSString *text = [[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"];
CGSize withinSize = CGSizeMake(225, CGFLOAT_MAX);
CGRect textRect = [text boundingRectWithSize:withinSize
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14.0f]}
context:nil];
CGSize size = textRect.size;
[cell bucketDesc].frame = CGRectMake(15, 12, 240, size.height);
[cell bucketDescView].frame = CGRectMake(20, 82, 280, size.height + 30);
[cell bucketDescBtn].frame = CGRectOffset([cell bucketDescBtn].frame, 0, size.height + 35);
[cell bucketPrivBtn].frame = CGRectOffset([cell bucketPrivBtn].frame, 0, size.height + 35);
[cell bucketShareBtn].frame = CGRectOffset([cell bucketShareBtn].frame, 0, size.height + 35);
[cell bucketPhotoBtn].frame = CGRectOffset([cell bucketPhotoBtn].frame, 0, size.height + 35);
[cell bucketDeleteBtn].frame = CGRectOffset([cell bucketDeleteBtn].frame, 0, size.height + 35);
[cell bucketRepeatBtn].frame = CGRectOffset([cell bucketRepeatBtn].frame, 0, size.height + 35);
[[cell bucketDesc] setText:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"]];
}
if ([[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"is_private"] intValue]){
[[cell bucketPrivBtn] setImage:[UIImage imageNamed:@"glyphicons_203_lock.png"] forState:UIControlStateNormal];
} else {
[[cell bucketPrivBtn] setImage:[UIImage imageNamed:@"glyphicons_204_unlock.png"] forState:UIControlStateNormal];
}
if([[[bucketDetailListMeta objectAtIndex:indexPath.row] objectForKey:@"expanded"] intValue]){
// NSLog(@"expanded");
[[cell bucketExpandBtn] setImage:[UIImage imageNamed:@"glyphicons_369_collapse_top.png"] forState:UIControlStateNormal];
} else {
[[cell bucketExpandBtn] setImage:[UIImage imageNamed:@"glyphicons_367_expand.png"] forState:UIControlStateNormal];
[cell bucketDescBtn].hidden = YES;
[cell bucketPrivBtn].hidden = YES;
[cell bucketShareBtn].hidden = YES;
[cell bucketPhotoBtn].hidden = YES;
[cell bucketDeleteBtn].hidden = YES;
[[cell bucketRepeatBtn] setHidden:YES];
[[cell bucketDescBtn] setHidden:YES];
[[cell bucketDescView] setHidden:YES];
}
[[cell bucketPrivBtn] addTarget:self action:@selector(bucketPrivBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
[[cell bucketShareBtn] addTarget:self action:@selector(bucketShareBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
[[cell bucketPhotoBtn] addTarget:self action:@selector(bucketPhotoBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
[[cell bucketDeleteBtn] addTarget:self action:@selector(bucketDeleteBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
[[cell bucketRepeatBtn] addTarget:self action:@selector(bucketRepeatBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
[[cell bucketExpandBtn] addTarget:self action:@selector(bucketExpandBtnTapped:) forControlEvents:UIControlEventTouchUpInside];
UITapGestureRecognizer *tgrDesc = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(bucketDescViewTapped:)];
[tgrDesc setNumberOfTapsRequired:1];
[[cell bucketDescView] addGestureRecognizer:tgrDesc];
[[cell bucketDescView] setUserInteractionEnabled:YES];
UITapGestureRecognizer *tgrTitle = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(bucketTitleViewTapped:)];
[tgrTitle setNumberOfTapsRequired:1];
[[cell bucketTitleView] addGestureRecognizer:tgrTitle];
[[cell bucketTitleView] setUserInteractionEnabled:YES];
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
if ([[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"level"] isEqualToString:@"0"]){
[bucketDetailListMeta addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:@"1",@"expanded",nil]];
} else {
[bucketDetailListMeta addObject:[NSMutableDictionary dictionaryWithObjectsAndKeys:@"0",@"expanded",nil]];
}
if ([[[bucketDetailListMeta objectAtIndex:indexPath.row] objectForKey:@"expanded"] intValue]){
// if([bucket objectForKey:@"description"] == [NSNull null] || [[bucket objectForKey:@"description"] isEqualToString:@""]){
if([[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] == [NSNull null] || [[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] isEqualToString:@""]){
[[bucketDetailListMeta objectAtIndex:indexPath.row] setValue:[NSString stringWithFormat:@"%f",130.00] forKey:@"cellHeight"];
return 130;
} else {
NSString *text = [bucket objectForKey:@"description"];
CGSize withinSize = CGSizeMake(225, CGFLOAT_MAX);
CGRect textRect = [text boundingRectWithSize:withinSize
options:NSStringDrawingUsesLineFragmentOrigin
attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14.0f]}
context:nil];
CGSize size = textRect.size;
[[bucketDetailListMeta objectAtIndex:indexPath.row] setValue:[NSString stringWithFormat:@"%f",size.height] forKey:@"cellHeight"];
return size.height + 165;
}
} else {
CGSize size = CGSizeMake(0, 0);
[[bucketDetailListMeta objectAtIndex:indexPath.row] setValue:[NSString stringWithFormat:@"%f",size.height] forKey:@"cellHeight"];
return 90;
}
}
- (void)sortBucketDetailList{
NSMutableDictionary *tmpDic;
int indexMin;
for (int i=0; i<[bucketDetailList count]-1; i++){
indexMin = i;
for (int j=i+1;j<[bucketDetailList count]; j++){
if ([[bucketDetailList[j] objectForKey:@"level"] intValue] < [[bucketDetailList[indexMin] objectForKey:@"level"] intValue]){
indexMin = j;
}
tmpDic = bucketDetailList[indexMin];
bucketDetailList[indexMin] = bucketDetailList[i];
bucketDetailList[i] = tmpDic;
}
}
}
- (void)bucketPrivBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
LifeScreenDetailCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
NSMutableDictionary *dictionary = [bucketDetailList objectAtIndex:indexPath.row];
NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
[params setValue:[NSString stringWithFormat:@"%d", ![[dictionary objectForKey:@"is_private"] intValue]] forKey:@"is_private"];
[[API sharedInstance] putToURI:[NSString stringWithFormat:@"api/bucket/%@",[dictionary objectForKey:@"id"]]
withParams:params
onCompletion:^(NSDictionary *json){
if(![json objectForKey:@"error"]){
[[bucketDetailList objectAtIndex:indexPath.row] setValue:[[json objectForKey:@"bucket"] objectForKey:@"is_private"] forKey:@"is_private"];
if([[[json objectForKey:@"bucket"] objectForKey:@"is_private"] intValue]){
NSLog(@"1");
[[cell bucketPrivBtn]setImage:[UIImage imageNamed:@"glyphicons_203_lock.png"] forState:UIControlStateNormal];
} else {
NSLog(@"2");
[[cell bucketPrivBtn]setImage:[UIImage imageNamed:@"glyphicons_204_unlock.png"] forState:UIControlStateNormal];
}
} else {
[UIAlertView error:@"error"];
}
}
];
}
- (void)bucketShareBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
NSMutableDictionary *dictionary = [bucketDetailList objectAtIndex:indexPath.row];
LifeScreenAdd *lifeScreenAdd = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjAddBucket"];
[lifeScreenAdd setSaveType:@"SubBucket"];
[lifeScreenAdd setBucket:nil];
[lifeScreenAdd setNavTitle:@"Add SubBucket" withSubTitle:[dictionary objectForKey:@"title"]];
[lifeScreenAdd setParams:[NSMutableDictionary dictionaryWithObjectsAndKeys:[dictionary objectForKey:@"id"],@"parentID",
[NSString stringWithFormat:@"%d",[[dictionary objectForKey:@"level"] intValue]+1],@"level",
@"1",@"is_live",
@"",@"scope",
@"",@"rnage",nil]];
[self.navigationController pushViewController:lifeScreenAdd animated:YES];
}
- (void)bucketDeleteBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
[[API sharedInstance] deleteFromURI:[NSString stringWithFormat:@"api/bucket/%@",[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"id"]]
withParams:nil
onCompletion:^(id json){
if(![json objectForKey:@"error"]){
[UIAlertView error:@"Delete Succeeded"];
NSLog(@"%@",[bucketDetailList objectAtIndex:indexPath.row]);
[bucketDetailList removeObjectAtIndex:indexPath.row];
[self.tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
// SWRevealViewController *viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjMain"];
// [self presentViewController:viewController animated:YES completion:nil];
} else {
[UIAlertView error:@"Deletion Failed"];
}
}];
}
- (void)bucketRepeatBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
NSMutableDictionary *dictionary = [bucketDetailList objectAtIndex:indexPath.row];
LifeScreenRptAdd *lifeScreenRptAdd = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjAddRepeat"];
[lifeScreenRptAdd setBucket:dictionary];
[lifeScreenRptAdd setNavTitle:@"Set Repeat" withSubTitle:[dictionary objectForKey:@"title"]];
[self.navigationController pushViewController:lifeScreenRptAdd animated:YES];
}
- (void)bucketExpandBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
LifeScreenDetailCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
[[bucketDetailListMeta objectAtIndex:indexPath.row] setValue:[NSString stringWithFormat:@"%d", ![[[bucketDetailListMeta objectAtIndex:indexPath.row] objectForKey:@"expanded"] intValue]] forKey:@"expanded"];
if([[[bucketDetailListMeta objectAtIndex:indexPath.row] objectForKey:@"expanded"] intValue]){
[[cell bucketExpandBtn] setImage:[UIImage imageNamed:@"glyphicons_369_collapse_top.png"] forState:UIControlStateNormal];
[[cell bucketDescBtn] setHidden:NO];
[[cell bucketPrivBtn] setHidden:NO];
[[cell bucketShareBtn] setHidden:NO];
[[cell bucketPhotoBtn] setHidden:NO];
[[cell bucketDeleteBtn] setHidden:NO];
[[cell bucketRepeatBtn] setHidden:NO];
if([[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] == [NSNull null] || [[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"] isEqualToString:@""]){
[[cell bucketDescView] setHidden:YES];
} else {
[[cell bucketDescView] setHidden:NO];
[[cell bucketDesc] setText:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"description"]];
}
} else {
[[cell bucketExpandBtn] setImage:[UIImage imageNamed:@"glyphicons_367_expand.png"] forState:UIControlStateNormal];
[[cell bucketDescBtn] setHidden:YES];
[[cell bucketPrivBtn] setHidden:YES];
[[cell bucketShareBtn] setHidden:YES];
[[cell bucketPhotoBtn] setHidden:YES];
[[cell bucketDeleteBtn] setHidden:YES];
[[cell bucketRepeatBtn] setHidden:YES];
[[cell bucketDescView] setHidden:YES];
}
[self.tableView beginUpdates];
[self.tableView endUpdates];
}
- (void)bucketTitleViewTapped:(UIGestureRecognizer *)recognizer{
CGPoint tapPoint = [recognizer locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:tapPoint];
LifeScreenAdd *lifeScreenAdd = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjAddBucket"];
[lifeScreenAdd setSaveType:@"Modify"];
[lifeScreenAdd setBucket:[bucketDetailList objectAtIndex:indexPath.row]];
[lifeScreenAdd setParams:[NSMutableDictionary dictionaryWithObjectsAndKeys:nil]];
[lifeScreenAdd setNavTitle:@"Modify Bucket" withSubTitle:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@"title"]];
[self.navigationController pushViewController:lifeScreenAdd animated:YES];
}
- (void)bucketDescViewTapped:(UIGestureRecognizer *)recognizer {
CGPoint tapPoint = [recognizer locationInView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:tapPoint];
LifeScreenDescAdd *lifeScreenDescAdd = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjAddDesc"];
[lifeScreenDescAdd setBucket:[bucketDetailList objectAtIndex:indexPath.row]];
[self.navigationController pushViewController:lifeScreenDescAdd animated:YES];
// [self performSegueWithIdentifier:@"detailToEditDesc" sender:nil];
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([segue.identifier isEqualToString:@"detailToEditDesc"]){
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
LifeScreenDescAdd *lifeScreenDescAdd = segue.destinationViewController;
[lifeScreenDescAdd setBucket:[bucketDetailList objectAtIndex:indexPath.row]];
}
}
- (IBAction)addSubBucketBtnTapped{
NSMutableDictionary *dictionary = [bucketDetailList objectAtIndex:0];
LifeScreenAdd *lifeScreenAdd = [self.storyboard instantiateViewControllerWithIdentifier:@"DreamProjAddBucket"];
[lifeScreenAdd setSaveType:@"SubBucket"];
[lifeScreenAdd setBucket:nil];
[lifeScreenAdd setNavTitle:@"Add SubBucket" withSubTitle:[dictionary objectForKey:@"title"]];
[lifeScreenAdd setParams:[NSMutableDictionary dictionaryWithObjectsAndKeys:[dictionary objectForKey:@"id"],@"parentID",
[NSString stringWithFormat:@"%d",[[dictionary objectForKey:@"level"] intValue]+1],@"level",
@"1",@"is_live",
@"",@"scope",
@"",@"rnage",nil]];
[self.navigationController pushViewController:lifeScreenAdd animated:YES];
}
- (void)bucketPhotoBtnTapped:(id)sender{
CGPoint buttonPosition = [sender convertPoint:CGPointZero toView:self.tableView];
NSIndexPath *indexPath = [self.tableView indexPathForRowAtPoint:buttonPosition];
// [bucket objectForKey:[[bucketDetailList objectAtIndex:indexPath.row] objectForKey:@""]
// bucket = [bucket objectAtIndex:indexPath.row];
//
// NSLog(@"%@",bucket);
// [self.tableView reloadData];
}
/*
// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the specified item to be editable.
return YES;
}
*/
/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
{
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source
[tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
}
}
*/
/*
// Override to support rearranging the table view.
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath
{
}
*/
/*
// Override to support conditional rearranging of the table view.
- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath
{
// Return NO if you do not want the item to be re-orderable.
return YES;
}
*/
/*
#pragma mark - Navigation
// In a story board-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