Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. #pragma mark - Animations
  2. - (void)startAnimation{
  3.  
  4. [self.view endEditing:YES];
  5. [UIView beginAnimations:nil context:NULL];
  6. [UIView setAnimationDuration:0.25];
  7.  
  8. UIView *customNaviagtionBar = [self.view viewWithTag:78];
  9. CGRect rect2 = customNaviagtionBar.frame;
  10. rect2.origin.y = -44;
  11. customNaviagtionBar.frame = rect2;
  12.  
  13.  
  14. if(isCustomMarkerSelected == YES)
  15. {
  16. if(PikUpViewForConfirmScreen && DropOffViewForConfirmScreen){
  17. CGRect rectPick = PikUpViewForConfirmScreen.frame;
  18. rectPick.origin.y = 20;
  19. PikUpViewForConfirmScreen.frame = rectPick;
  20.  
  21. CGRect rectDrop = DropOffViewForConfirmScreen.frame;
  22. rectDrop.origin.y = 64;
  23. DropOffViewForConfirmScreen.frame = rectDrop;
  24. }
  25. else{
  26. CGRect rect = PikUpViewForConfirmScreen.frame;
  27. rect.origin.y = 20;
  28. PikUpViewForConfirmScreen.frame = rect;
  29. }
  30.  
  31.  
  32. }
  33. else{
  34. UIView *customLocationView = [self.view viewWithTag:topViewTag];
  35. CGRect rect = customLocationView.frame;
  36. rect.origin.y = 20;
  37. customLocationView.frame = rect;
  38.  
  39. }
  40. [UIView commitAnimations];
  41.  
  42. [self animateOutVehicleTypes];
  43.  
  44. }
  45.  
  46. - (void)endAnimation{
  47.  
  48. [UIView beginAnimations:nil context:NULL];
  49. [UIView setAnimationDuration:0.25];
  50.  
  51. UIView *customNaviagtionBar = [self.view viewWithTag:78];
  52. CGRect rect2 = customNaviagtionBar.frame;
  53.  
  54.  
  55. rect2.origin.y = 0;
  56. customNaviagtionBar.frame = rect2;
  57.  
  58.  
  59.  
  60. if(isCustomMarkerSelected == YES)
  61. {
  62. if(PikUpViewForConfirmScreen && DropOffViewForConfirmScreen){
  63. CGRect rectPick = PikUpViewForConfirmScreen.frame;
  64. rectPick.origin.y = 64;
  65. PikUpViewForConfirmScreen.frame = rectPick;
  66.  
  67. CGRect rectDrop = DropOffViewForConfirmScreen.frame;
  68. rectDrop.origin.y = 108;
  69. DropOffViewForConfirmScreen.frame = rectDrop;
  70. }
  71. else{
  72. CGRect rect = PikUpViewForConfirmScreen.frame;
  73. rect.origin.y = 64;
  74. PikUpViewForConfirmScreen.frame = rect;
  75. }
  76.  
  77.  
  78. }
  79. else {
  80. UIView *customLocationView = [self.view viewWithTag:topViewTag];
  81. CGRect rect = customLocationView.frame;
  82. rect.origin.y = 64;
  83. customLocationView.frame = rect;
  84. }
  85.  
  86. [UIView commitAnimations];
  87. [self animateInVehicleTypes];
  88. }
  89.  
  90.  
  91.  
  92. - (void)closeTransparentView{
  93.  
  94. UIView *viewToClose = [self.view viewWithTag:50];
  95. [UIView beginAnimations:nil context:NULL];
  96. [UIView setAnimationDuration:0.25];
  97. [viewToClose removeFromSuperview];
  98.  
  99. [UIView commitAnimations];
  100.  
  101. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement