iOS - Open/Show view swiping down from navigation bar
i would like to know if is possible open/show a new view swiping down ( or up ) from the navigation bar, just like the notification cente开发者_如何学编程r view in iOS 5 ( it appear from status bar, and i think this isn't possible for normal apps, right? ). Thanks :)
You have to use UISwipeGestureRecognizer. Here's the code :
UISwipeGestureRecognizer *swipeUp=[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(youSelector:)];
[swipeUp setNumberOfTouchesRequired:2];
[swipeUp setDirection:UISwipeGestureRecognizerDirectionUp];
[yourView addGestureRecognizer:swipeUp];
精彩评论