ios - how to make a button do two actions - elevate up and when pressed the second time go down? -


is new way write code... anyway, need user press button first go down , go down measurements 229 y , 160 x... how done?

- (ibaction)closehints:(id)sender {  [uiview beginanimations:nil context:null]; [uiview setanimationduration:0.5]; cgpoint center = [hints center]; center.x = 160; center.y = 290; [hints setcenter:center];  [uiview commitanimations]; } 

- (ibaction)closehints:(id)sender {     [uiview animatewithduration:0.5                           delay:0                         options:uiviewanimationoptionbeginfromcurrentstate                      animations:^{                          cgpoint center = [hints center];                          if(hints.center.y != 290){                               center.y = 290;                          }                          else{                               center.y = originy; //you should define                          }                          [hints setcenter:center];                      }                      completion:nil];  } 

Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -