Advertisement
Guest User

Untitled

a guest
May 31st, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.35 KB | None | 0 0
  1. self.toolBarState = [NSNumber numberWithInt:1];
  2. [self changeButtonNames];
  3. [self drawMap];
  4. [self performSelector:@selector(showActionSheet) withObject:nil afterDelay:2];
  5.  
  6. HUD = [[MBProgressHUD alloc] initWithView:self.view];
  7. [self.view addSubview:HUD];
  8. HUD.delegate = (id) self;
  9. [HUD showWhileExecuting:@selector(drawMap) onTarget:self withObject:nil animated:YES];
  10.  
  11. [self performSelector:@selector(showActionSheet) withObject:nil afterDelay:6];
  12.  
  13. -(void)showActionSheet
  14. {
  15. InspectAppDelegate *dataCenter = (InspectAppDelegate *) [[UIApplication sharedApplication] delegate];
  16.  
  17. if (dataCenter.fieldIDToPass == nil)
  18. {
  19. UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Selected Boundary Options" delegate:(id) self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Analyze a Field",@"Retrieve Saved Analysi", @"Geotag Photos", @"Refresh the map",nil];
  20. actionSheet.tag = 0;
  21. [actionSheet showInView:self.view];
  22. }
  23. else
  24. {
  25. UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Selected Boundary Options" delegate:(id) self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Analyze a Field",@"Retrieve Saved Analysi", @"Geotag Photos", @"Attribute the Field", @"Refresh the map",nil];
  26. actionSheet.tag = 0;
  27. [actionSheet showInView:self.view];
  28.  
  29. }
  30. }
  31.  
  32. -(void) foundDoubleTap:(UITapGestureRecognizer *) recognizer
  33. {
  34. [HUD showWhileExecuting:@selector(select) onTarget:self withObject:nil animated:YES];
  35. }
  36.  
  37. -(void) select
  38. {
  39. [self changeButtonNames];
  40. [self drawMap];
  41. [self performSelector:@selector(showActionSheet) withObject:nil afterDelay:2];
  42. }
  43.  
  44. -(void) select {
  45. [self changeButtonNames];
  46. [self drawMap];
  47. [self performSelectorOnMainThread:@selector(showActionSheet) withObject:nil waitUntilDone:YES];
  48. }
  49.  
  50. -(void) select {
  51. [self changeButtonNames];
  52. [self drawMap];
  53. [self performSelectorOnMainThread:@selector(someA) withObject:nil waitUntilDone:YES];
  54. }
  55.  
  56. -(void)someA {
  57. [self performSelector:@selector(showActionSheet) withObject:nil afterDelay:2];
  58. }
  59.  
  60. dispatch_async(dispatch_get_main_queue(), ^{
  61. [self performSelector:loopSelector withObject:nil afterDelay:cycleTime];
  62. });
  63.  
  64. [[[RACSignal empty] delay:2.0] subscribeCompleted:^(){
  65. // do something
  66. }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement