I saw in my iPhone app that there is a gesture on the status bar which can access Notification Center. How can I implement that kind of transition in my app?. I think this is done with the swipe gesture recognizer, but how do I include a swipe gesture from top to bottom (how you can drag the Notification Center through its full transition)? Is there any sample code or something that can help me do this?
Thaks in advance
I saw in my iPhone app that there is a gesture on the status
Share
Should be easy to do. Let’s say you have a
UIView(mainView) from which you want to trigger the pull down thing.pulldownView) on mainView top-outside of visible area.touchesBeganonmainViewand check if the touch is in the top 30 pixels (or points).touchesMovedwhere you check, if move direction is down andpulldownViewnot visible and if so drag thepulldownViewdown into visible area of main view or check if move direction is up andpulldownViewvisible and if so push upwards out of visible area.touchesEndwhere you end the drag or push movement by checking in which direction thepulldownViewwas moved.EDIT:
Here’s some sample code. Untested, may contain typos, maybe won’t compile, but should contain the essential part needed.