开发者

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];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜