Guest User

Untitled

a guest
May 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. if (buttonIndex == 0){
  2. if(!isGenre && !isSearching){
  3. [appdelegate copyArray];
  4. wordArray = [appdelegate.appDelMovieView mutableCopy];
  5. [self createSectionList:wordArray];
  6. [rootTable reloadData];
  7. }else{
  8. wordArray = [[NSMutableArray alloc] initWithArray:sectionArray copyItems:YES];
  9. NSLog(@"copied to word array %@", wordArray);
  10. }
  11. NSInteger countSec = [letters count];
  12.  
  13. self.title = @"DVD";
  14. find = @"DVD";
  15.  
  16. for (int z = (countSec -1); z > -1; z--){
  17. section = z;
  18.  
  19. NSInteger count = [[sectionArray objectAtIndex:section] count];
  20.  
  21. for (int n = (count -1); n > -1; n--){
  22.  
  23. Movie *show = (Movie *)[[sectionArray objectAtIndex:section] objectAtIndex:n];
  24.  
  25. if ( [show.format isEqualToString:find] ){
  26.  
  27. }else{
  28.  
  29. if(!isGenre && !isSearching){
  30. [appdelegate.appDelMovieView removeObject:show];
  31. }else{
  32. [[sectionArray objectAtIndex:section] removeObject:show];
  33. }
  34. }
  35. }
  36. }
  37. if(!isGenre && !isSearching){
  38.  
  39. wordArray = [appdelegate.appDelMovieView mutableCopy];
  40. [self createSectionList:wordArray];
  41. [rootTable reloadData];
  42.  
  43. }else{
  44. [rootTable reloadData];
  45. [sectionArray removeAllObjects];
  46. sectionArray = [wordArray mutableCopy];
  47. NSLog(@"boobies %@",wordArray);
  48. // NSLog(@"copied to word array %@", wordArray);
  49. // NSLog(@"copied back %@", sectionArray);
  50. }
Add Comment
Please, Sign In to add comment