Guest User

Untitled

a guest
Jan 16th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. inbound = [NSArray arrayWithArray:[theAccount.incomes sortedArrayUsingDescriptors:[NSArray arrayWithObject:desc]]];
  2. outbound = [NSArray arrayWithArray:[theAccount.expenses sortedArrayUsingDescriptors:[NSArray arrayWithObject:desc]]];
  3. NSMutableSet *allSet = [NSMutableSet setWithArray:inbound];
  4. [allSet unionSet:[NSSet setWithArray:outbound]];
  5. all = [NSArray arrayWithArray:[allSet sortedArrayUsingDescriptors:[NSArray arrayWithObject:desc]]];
  6.  
  7. NSLog(@"The inbound array is : n");
  8.  
  9. for (Transaction *trs in inbound) {
  10. NSLog(@"Transaction name:%@ transaction sum : %.2f isExpense : %@",trs.name,[trs.totalAmountInDefaultCurrency doubleValue],trs.isExpense);
  11. }
  12.  
  13. NSLog(@"The outbound array is : n");
  14.  
  15. for (Transaction *trs in outbound) {
  16. NSLog(@"Transaction name:%@ transaction sum : %.2f isExpense : %@",trs.name,[trs.totalAmountInDefaultCurrency doubleValue],trs.isExpense);
  17. }
  18.  
  19. 2012-10-01 18:38:54.079 app[5508:12203] The inbound array is :
  20. 2012-10-01 18:38:54.080 app[5508:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  21. 2012-10-01 18:38:54.080 app[5508:12203] The outbound array is :
  22. 2012-10-01 18:38:54.081 app[5508:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  23. 2012-10-01 18:38:54.082 app[5508:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  24. 2012-10-01 18:38:54.083 app[5508:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  25.  
  26. 2012-10-01 18:46:18.798 app[5630:12203] The inbound array is :
  27. 2012-10-01 18:46:18.799 app[5630:12203] The outbound array is :
  28. 2012-10-01 18:46:18.800 app[5630:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  29. 2012-10-01 18:46:18.800 app[5630:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  30. 2012-10-01 18:46:18.801 app[5630:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
  31. 2012-10-01 18:46:18.802 app[5630:12203] Transaction name:kfc transaction sum : 20.00 isExpense : 1
Add Comment
Please, Sign In to add comment