Advertisement
Badal_hs_shah

Untitled

Aug 29th, 2023
921
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //
  2. //  AuditCommentsController.m
  3. //  Roma
  4. //
  5. //  Created by Brian Seelig on 6/20/11.
  6. //  Copyright 2011 RW3 Inc. All rights reserved.
  7. //
  8. #import <QuartzCore/QuartzCore.h>
  9. #import "CallCommentsController.h"
  10. #import "CarbonAppDelegate.h"
  11. #import "PHCommentCell.h"
  12. #import "MBProgressHUD.h"
  13.  
  14. @implementation CallCommentsController
  15. {
  16.    UIFont *_defaultViewFont;
  17.    Store *_store;
  18. }
  19.  
  20. @synthesize call;
  21. @synthesize store;
  22. @synthesize textViewComments;
  23. @synthesize commentsHistory;
  24. @synthesize tableViewCommentsHistory;
  25. @synthesize commentsCellHeight;
  26. @synthesize gestureRecognizer;
  27. @synthesize navController;
  28. @synthesize labelCallComments;
  29. @synthesize captureAuditCommentButton;
  30.  
  31. const NSInteger CommentMaxLength = 500;
  32. const CGFloat _defaultFontSize = 14.0f;
  33.  
  34. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  35. {
  36.     self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  37.     if (self)
  38.     {
  39.        _defaultViewFont = [UIFont systemFontOfSize:_defaultFontSize];
  40.     }
  41.     return self;
  42. }
  43.  
  44. - (void)didReceiveMemoryWarning
  45. {
  46.    [super didReceiveMemoryWarning];
  47.    LogMemory();
  48.    [[NSNotificationCenter defaultCenter] removeObserver: self];
  49.    [Logger reportMemory];
  50. }
  51.  
  52. - (bool)hasData {
  53.    if(call.comment.length > 0 ||
  54.       [[DataManager sharedInstance] getNumberOfCallCommentImagesWithStoreID:call.storeID auditID:call.auditID callID:nil] > 0 ||
  55.       [[DataManager sharedInstance] getAllCallCommentsHistoryForStoreID:call.storeID auditID:call.auditID].count > 0) {
  56.       return YES;
  57.    }
  58.    return NO;
  59. }
  60.  
  61. #pragma mark - View lifecycle
  62.  
  63. - (void)viewDidLoad
  64. {
  65.    [super viewDidLoad];
  66.    LogMemory();
  67.    
  68.    if([ClientType isEqualToString:ClientTypeMA])
  69.    {
  70.       labelCallComments.text = NSLocalizedString(@"Audit Comments:", nil);
  71.    }
  72.    else
  73.    {
  74.       labelCallComments.text = NSLocalizedString(@"Call Comments:", nil);
  75.    }
  76.    
  77.    [textViewComments setText: call.comment];
  78.    [textViewComments.layer setBackgroundColor: [[UIColor whiteColor] CGColor]];
  79.    [textViewComments.layer setBorderColor: [[UIColor grayColor] CGColor]];
  80.    [textViewComments.layer setBorderWidth: 1.0];
  81.    [textViewComments.layer setCornerRadius:8.0f];
  82.    [textViewComments.layer setMasksToBounds:YES];
  83.    
  84.    //iPhone 4S
  85.    if (IS_IPHONE && (self.navController.view.frame.size.height == 480)) {
  86.       textViewComments.autocorrectionType = UITextAutocorrectionTypeNo;
  87.    }
  88.    
  89.    gestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard:)];
  90.    [self.view addGestureRecognizer:gestureRecognizer];
  91.    
  92.    self.commentsHistory = [[DataManager sharedInstance] getAllCallCommentsHistoryForStoreID:call.storeID auditID:call.auditID];
  93.    
  94.    if (IS_IPHONE) {
  95.       self.tableViewCommentsHistory.rowHeight = UITableViewAutomaticDimension;
  96.       self.tableViewCommentsHistory.estimatedRowHeight = 44;
  97.    }
  98. }
  99.  
  100. - (void)viewDidAppear:(BOOL)animated
  101. {
  102.    [super viewDidAppear:animated];
  103.    [[NSNotificationCenter defaultCenter] removeObserver:self];
  104.    
  105.    NSInteger numberOfImages = [[DataManager sharedInstance] getNumberOfCallCommentImagesWithStoreID:call.storeID auditID:call.auditID callID:nil];
  106.    
  107.    if (IS_IPAD) {
  108.  
  109.       [captureAuditCommentButton setContentMode: UIViewContentModeLeft];
  110.       [captureAuditCommentButton setImage:[UIImage imageNamed:@"Camera_Button"] forState:UIControlStateNormal];
  111.       [captureAuditCommentButton addTarget:self action:@selector(tappedAuditCommentCaptureButton:)
  112.                           forControlEvents:UIControlEventTouchDown];
  113.       captureAuditCommentButton.tag = -1;
  114.      
  115.       if(numberOfImages != 0)
  116.       {
  117.          CustomBadge *customBudge = auditCommentCustomBadge;
  118.          if (customBudge == nil) {
  119.              customBudge = [CustomBadge customBadgeWithString:[NSString stringWithFormat:@"%zd", numberOfImages]
  120.                                                           withStringColor:[UIColor whiteColor]
  121.                                                            withInsetColor:[UIColor blueColor]
  122.                                                            withBadgeFrame:NO
  123.                                                       withBadgeFrameColor:[UIColor grayColor]
  124.                                                                 withScale:0.9
  125.                                                               withShining:YES];
  126.             CGSize badgeSize = customBudge.frame.size;
  127.             [customBudge setFrame:CGRectMake(44-badgeSize.width, MAX(badgeSize.height, 44.0f) / 2 - 22, badgeSize.width, badgeSize.height)];
  128.             [captureAuditCommentButton addSubview:customBudge];
  129.             [customBudge setTag: -1];
  130.             [customBudge setDelegate:self];
  131.             auditCommentCustomBadge = customBudge;
  132.            
  133.          } else {
  134.             [customBudge autoBadgeSizeWithString:[NSString stringWithFormat:@"%zd", numberOfImages]];
  135.             CGSize badgeSize = customBudge.frame.size;
  136.             [customBudge setFrame:CGRectMake(44-badgeSize.width, MAX(badgeSize.height, 44.0f) / 2 - 22, badgeSize.width, badgeSize.height)];
  137.          }
  138.  
  139.       }
  140.      
  141.    } else {  // Phone
  142.      
  143.       if (numberOfImages != 0) {
  144.          self.auditCommentBadgeLabel.text = [NSString stringWithFormat:@"%zd", numberOfImages];
  145.          self.auditCommentBadgeLabel.hidden = NO;
  146.       } else {
  147.          self.auditCommentBadgeLabel.hidden = YES;
  148.       }
  149.       [tableViewCommentsHistory reloadData];
  150.    }
  151.    
  152.    [Logger reportMemory];
  153.    [tableViewCommentsHistory performSelector:@selector(flashScrollIndicators) withObject:nil afterDelay:0.75f];
  154.    
  155.    [[NSNotificationCenter defaultCenter] addObserver:self
  156.                                             selector:@selector(keyboardWillShown:)
  157.                                                 name:UIKeyboardWillShowNotification object:nil];
  158.    
  159.    [[NSNotificationCenter defaultCenter] addObserver:self
  160.                                             selector:@selector(keyboardWillBeHidden:)
  161.                                                 name:UIKeyboardWillHideNotification object:nil];
  162. }
  163.  
  164. - (void)viewDidDisappear:(BOOL)animated
  165. {
  166.    [super viewDidDisappear:animated];
  167.    [[NSNotificationCenter defaultCenter] removeObserver:self];
  168. }
  169.  
  170. #pragma mark Keyboard and TextView
  171.  
  172. - (void)dismissKeyboard:(UIGestureRecognizer *)sender
  173. {
  174.    [textViewComments resignFirstResponder];
  175.    
  176.    CGPoint tappedPoint = [sender locationInView:self.view];
  177.    UIView *tappedView = [self.view hitTest:tappedPoint withEvent:nil];
  178.    if([tappedView isKindOfClass:UIButton.class] && ((UIButton*)tappedView).tag != -1) {
  179.       [((UIButton*)tappedView) sendActionsForControlEvents:UIControlEventTouchUpInside];
  180.    } else if([tappedView isKindOfClass:CustomBadge.class] && ((CustomBadge*)tappedView).tag != -1) {
  181.       [self loadAuditCommentHistoryCapture:self indexRow:((CustomBadge*)tappedView).tag];
  182.    }
  183. }
  184.  
  185. - (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
  186. {
  187.    if([text length] == 0)
  188.    {
  189.       if([textView.text length] != 0)
  190.       {
  191.          return YES;
  192.       }
  193.       else
  194.       {
  195.          return NO;
  196.       }
  197.    }
  198.    else if([[textView text] length] > CommentMaxLength)
  199.    {
  200.       return NO;
  201.    }
  202.    return YES;
  203. }
  204.  
  205. - (BOOL)textViewShouldEndEditing:(UITextView *)textView {
  206.    if([CarbonAppDelegate sharedInstance].isDiscardDataInProgress == NO) {
  207.       [self saveAuditComments];
  208.    }
  209.    return YES;
  210. }
  211.  
  212. - (void)saveAuditComments {
  213.    call.comment = textViewComments.text;
  214.    [[DataManager sharedInstance] save];
  215. }
  216.  
  217. #pragma mark Take Photo (view mode)
  218.  
  219. - (void)loadAuditCommentHistoryCapture:(id)sender indexRow:(NSInteger)indexRow
  220. {
  221.    [MBProgressHUD showHUDAddedTo:self.navController.view animated:YES]; // wil be removed at TakePhotoController
  222.    
  223.    CallComment *auditComment = (CallComment *) [self.commentsHistory objectAtIndex:indexRow];
  224.    StoreTakePhotoViewController *imageCapture = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"StoreTakePhotoViewController"];
  225.    [imageCapture setImageType:AuditCommentHistoryImages];
  226.    [imageCapture setCall:call];
  227.    [imageCapture setAuditCallId:auditComment.callID];
  228.    [imageCapture setAuditId:auditComment.call.auditID];
  229.    [imageCapture setStore:store];
  230.    [imageCapture setStoreQuestion:nil];
  231.    [imageCapture setCategory:nil];
  232.    [imageCapture setSubcategory:nil];
  233.    dispatch_async(dispatch_get_main_queue(), ^{ // async is needed to show spinner
  234.       [self->navController pushViewController:imageCapture animated:YES];
  235.    });
  236. }
  237.  
  238. - (IBAction)tappedAuditCommentCaptureButton:(id)sender
  239. {
  240.    [textViewComments resignFirstResponder];
  241.    
  242.    [MBProgressHUD showHUDAddedTo:self.navController.view animated:YES]; // wil be removed at TakePhotoController
  243.    
  244.    StoreTakePhotoViewController *imageCapture = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"StoreTakePhotoViewController"];
  245.    [imageCapture setImageType:AuditCommentImages];
  246.    [imageCapture setCall:call];
  247.    [imageCapture setAuditId:call.auditID];
  248.    [imageCapture setStore:store];
  249.    [imageCapture setAuditCallId:nil];
  250.    [imageCapture setStoreQuestion:nil];
  251.    [imageCapture setCategory:nil];
  252.    [imageCapture setSubcategory:nil];
  253.    dispatch_async(dispatch_get_main_queue(), ^{ // async is needed to show spinner
  254.       [self->navController pushViewController:imageCapture animated:YES];
  255.    });
  256. }
  257.  
  258. - (void)didTapWithTagValue:(NSInteger)tagValue
  259. {
  260.    [self loadAuditCommentHistoryCapture:self indexRow:tagValue];
  261. }
  262.  
  263. - (void)didTap
  264. {
  265.    [self tappedAuditCommentCaptureButton:self];
  266. }
  267.  
  268. -(IBAction)tappedAuditCommentHistoryButton:(id)sender {
  269.    LogNormal();
  270.    if (IS_IPAD) {
  271.       NSInteger tagValue = ((UIButton*)sender).tag;
  272.       [self loadAuditCommentHistoryCapture:self indexRow:tagValue];
  273.    } else { // Phone
  274.       CGPoint buttonPoint = [sender convertPoint:CGPointZero toView:tableViewCommentsHistory];
  275.       NSIndexPath *indexPath = [tableViewCommentsHistory indexPathForRowAtPoint:buttonPoint];
  276.       [self loadAuditCommentHistoryCapture:self indexRow:indexPath.row];
  277.    }
  278.    
  279.    
  280. }
  281.  
  282. #pragma mark Table View
  283.  
  284. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  285.    UILabel *label = [UILabel new];
  286.    if([ClientType isEqualToString:ClientTypeMA]) {
  287.       label.text = NSLocalizedString(@"   Audit Comments History:", nil);
  288.    } else {
  289.       label.text = NSLocalizedString(@"   Call Comments History:", nil);
  290.    }
  291.    label.font = [UIFont boldSystemFontOfSize:14];
  292.    label.backgroundColor = [UIColor whiteColor];
  293.    return label;
  294. }
  295.  
  296. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  297.    return [self.commentsHistory count];  
  298. }  
  299.  
  300. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  301. {
  302.    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
  303.    [formatter setDateFormat: DateFormat];
  304.    CallComment *callComment = (CallComment*)[self.commentsHistory objectAtIndex:[indexPath row]];
  305.    NSInteger numberOfImages = [[DataManager sharedInstance] getNumberOfCallCommentImagesWithStoreID:call.storeID auditID:call.auditID callID:callComment.callID];
  306.    
  307.    NSString *callDate = [formatter stringFromDate: callComment.callDate];
  308.    
  309.    if (IS_IPAD) {
  310.       NSString *commentHistoryCellId = @"CallCommentHistoryCell";
  311.      
  312.       UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:commentHistoryCellId];
  313.       if (cell == nil) {
  314.          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:commentHistoryCellId];
  315.       }
  316.      
  317.       cell.textLabel.lineBreakMode = NSLineBreakByWordWrapping;
  318.       cell.textLabel.numberOfLines = 0;
  319.       cell.textLabel.font = _defaultViewFont;
  320.      
  321.       NSString *text = [NSString stringWithFormat: @"%@ (%@): \n%@", callDate, callComment.person, callComment.comment];
  322.  
  323.       if(numberOfImages != 0) {
  324.          UIButton *captureButton = [UIButton buttonWithType:UIButtonTypeCustom];
  325.          [captureButton setFrame:CGRectMake(0, 0, 44.0f, 44.0f)];
  326.          [captureButton setContentMode: UIViewContentModeLeft];
  327.          [captureButton setImage:[UIImage imageNamed:@"Camera_Button"] forState:UIControlStateNormal];
  328.          [captureButton setUserInteractionEnabled:YES];
  329.          [captureButton addTarget:self action:@selector(tappedAuditCommentHistoryButton:) forControlEvents:UIControlEventTouchUpInside];
  330.          [captureButton setTag:[indexPath row]];
  331.          CustomBadge *customBadge = [CustomBadge customBadgeWithString:@""
  332.                                                        withStringColor:[UIColor whiteColor]
  333.                                                         withInsetColor:[UIColor blueColor]
  334.                                                         withBadgeFrame:NO
  335.                                                    withBadgeFrameColor:[UIColor grayColor]
  336.                                                              withScale:0.9
  337.                                                            withShining:YES];
  338.          [customBadge autoBadgeSizeWithString:[NSString stringWithFormat:@"%zd", numberOfImages]];
  339.          CGRect badgeRect = customBadge.frame;
  340.          [customBadge setFrame:CGRectMake(44-badgeRect.size.width, MAX(badgeRect.size.height, 44.0f) / 2 - 22, badgeRect.size.width, badgeRect.size.height)];
  341.          [captureButton addSubview:customBadge];
  342.          cell.accessoryView = captureButton;
  343.          [customBadge setTag:[indexPath row]];
  344.          [customBadge setDelegate:self];
  345.          
  346.       } else {
  347.          cell.accessoryView = nil;
  348.       }
  349.  
  350.       cell.textLabel.text = text;
  351.       [cell setSelectionStyle:UITableViewCellSelectionStyleNone];
  352.      
  353.       return cell;
  354.    
  355.    } else { // Phone
  356.      
  357.       PHCommentCell *cell = [tableView dequeueReusableCellWithIdentifier:@"PHCommentCell" forIndexPath:indexPath];
  358.      
  359.       cell.personLabel.text = callComment.person;
  360.       cell.dateLabel.text = callDate;
  361.       cell.commentLabel.text = callComment.comment;
  362.  
  363.       if (numberOfImages != 0) {
  364.          cell.numberOfImagesLabel.hidden = NO;
  365.          cell.numberOfImagesLabel.text = [NSString stringWithFormat:@"%zd", numberOfImages];
  366.          cell.captureButton.hidden = NO;
  367.          cell.bottomCommentConstraint.constant = 30;
  368.       } else {
  369.          cell.numberOfImagesLabel.hidden = YES;
  370.          cell.numberOfImagesLabel.text = @"";
  371.          cell.captureButton.hidden = YES;
  372.          cell.bottomCommentConstraint.constant = 0;
  373.       }
  374.    
  375.       return cell;
  376.    }
  377.    
  378.    
  379. }
  380.  
  381. - (CGFloat)tableView:(UITableView *)aTableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  382. {
  383.    if (IS_IPAD) {
  384.       NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
  385.       [formatter setDateFormat: DateFormat];
  386.       CallComment *callComment = (CallComment*)[self.commentsHistory objectAtIndex:[indexPath row]];
  387.       NSString *callDate = [formatter stringFromDate: callComment.callDate];
  388.       NSString *text = [NSString stringWithFormat: @"%@: \n%@", callDate, callComment.comment];
  389.      
  390.       CGSize constraint = CGSizeMake(textViewComments.frame.size.width - (CELL_CONTENT_MARGIN * 2) - 60, 20000.0f);
  391.       NSDictionary *attibutes = @{NSFontAttributeName:_defaultViewFont};
  392.       CGSize size = [text boundingRectWithSize:constraint
  393.                                        options:NSStringDrawingUsesLineFragmentOrigin
  394.                                     attributes:attibutes context:nil].size;
  395.      
  396.       CGFloat height = MAX(size.height, 44.0f);
  397.       return height + (CELL_CONTENT_MARGIN * 2);
  398.      
  399.    } else { // Phone
  400.       return UITableViewAutomaticDimension;
  401.    }
  402. }
  403.  
  404. #pragma mark Rotation
  405.  
  406. - (void)receivedRotate:(UIInterfaceOrientation)toInterfaceOrientation {
  407.    if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {
  408.       commentsCellHeight.constant = 110;
  409.    } else if (UIInterfaceOrientationIsPortrait(toInterfaceOrientation)) {
  410.       commentsCellHeight.constant = 136;
  411.    }
  412. }
  413.  
  414.  
  415. #pragma mark - Keyboard
  416.  
  417. - (void)keyboardWillShown:(NSNotification*)aNotification
  418. {
  419.    NSDictionary* userInfo = [aNotification userInfo];
  420.    CGRect keyboardFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
  421.    keyboardFrame = [self.view convertRect:keyboardFrame fromView:self.view.window];
  422.    
  423.    double duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
  424.    NSInteger animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue];
  425.    [UIView transitionWithView:self.navigationController.view
  426.                      duration:duration
  427.                       options:(animationCurve & UIViewAnimationOptionBeginFromCurrentState)
  428.                    animations:^
  429.     {
  430.       UIEdgeInsets contentInset = self.tableViewCommentsHistory.contentInset;
  431.       contentInset.bottom = CGRectGetHeight(keyboardFrame) - 44;
  432.       self.tableViewCommentsHistory.contentInset = contentInset;
  433.       self.tableViewCommentsHistory.scrollIndicatorInsets = contentInset;
  434.    }
  435.                    completion:nil];
  436. }
  437.  
  438. - (void)keyboardWillBeHidden:(NSNotification*)aNotification
  439. {
  440.    NSDictionary* userInfo = [aNotification userInfo];
  441.    CGRect keyboardFrame = [[userInfo objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];
  442.    keyboardFrame = [self.view convertRect:keyboardFrame fromView:self.view.window];
  443.    
  444.    double duration = [userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue];
  445.    NSInteger animationCurve = [userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue];
  446.    [UIView transitionWithView:self.navigationController.view
  447.                      duration:duration
  448.                       options:(animationCurve & UIViewAnimationOptionBeginFromCurrentState)
  449.                    animations:^
  450.     {
  451.       UIEdgeInsets contentInset = self.tableViewCommentsHistory.contentInset;
  452.       contentInset.bottom -= CGRectGetHeight(keyboardFrame);
  453.       self.tableViewCommentsHistory.contentInset = contentInset;
  454.       self.tableViewCommentsHistory.scrollIndicatorInsets = contentInset;
  455.    }
  456.                    completion:nil];
  457. }
  458.  
  459.  
  460. #pragma mark Helper
  461.  
  462. - (void)restoreOriginalAuditComment {
  463.    [[DataManager sharedInstance] clearAuditCommentImagesForStoreID:call.storeID andAuditID:call.auditID];
  464.    call.comment = call.commentOriginal;
  465.    
  466.    NSArray *auditCommentImagesOriginal = [[DataManager sharedInstance] getAllAuditCommentImagesOriginalForStoreID:call.storeID andAuditID:call.auditID andAuditCallID:nil];
  467.    for(CallCommentImage *originalImage in auditCommentImagesOriginal)
  468.    {
  469.       CallCommentImage *restoredImage = [[DataManager sharedInstance] insertNewEntityOfClass:CallCommentImage.class];
  470.       [restoredImage setStoreID:originalImage.storeID];
  471.       [restoredImage setCallID:originalImage.callID];
  472.       [restoredImage setAuditID:originalImage.auditID];
  473.       [restoredImage setBackendID:originalImage.backendID];
  474.       [restoredImage setClientID:originalImage.clientID];
  475.       [restoredImage setImage:originalImage.image];
  476.       [restoredImage setDateTaken:originalImage.dateTaken];
  477.       [restoredImage setWasDeleted:originalImage.wasDeleted];
  478.       [restoredImage setIsTodaysAudit:[NSNumber numberWithBool:YES]];
  479.      
  480.       NSArray *auditCommentImageTagsOriginal = [[DataManager sharedInstance] getAllAuditCommentImageTagsOriginalForQuestionImageClientID:originalImage.clientID orBackendID:originalImage.backendID];
  481.       for(CallCommentImageTagOriginal *originalImageTag in auditCommentImageTagsOriginal)
  482.       {
  483.          CallCommentImageTag *restoredImageTag = [[DataManager sharedInstance] insertNewEntityOfClass:CallCommentImageTag.class];
  484.          restoredImageTag.imageBackendID = originalImageTag.imageBackendID;
  485.          restoredImageTag.imageClientID = originalImageTag.imageClientID;
  486.          restoredImageTag.imageTagID = originalImageTag.imageTagID;
  487.          restoredImageTag.wasDeleted = originalImageTag.wasDeleted;
  488.       }
  489.    }
  490.    [[DataManager sharedInstance] save];
  491. }
  492.  
  493. @end
  494.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement