How to hide the user uiview does not use the view?

advertisements

I have one view like shortcuts view with some buttons. Now when I click the shortcut button the shortcut view is appear now i want user does not touch the view how can hide the shortcuts view after 8 sec and also user touch the view before 8 sec it will appear.


You could use UIView animations and move the view out of your screen

[UIView animateWithDuration:0.333f
                      delay:8.0f
                    options:UIViewAnimationCurveEaseOut
                 animations:^(void) {
                      myView.transform = CGAffineTransformMakeTranslation(0,self.view.frame.size.height);
                           }
                 completion:nil];

In this example I am moving your view to the bottom of the screen, CGAffineTransformMakeTranslation(x,y) moves the frame of your view by the given x and y points

And to move it back, well, you get the drift ;)