I found a light bubble/callout with a long press gesture on a song in my Music app on iPhone 4 (iOS 5.0.1).
Does anyone found it and can help me to add this feature on other table view ?
I found a light bubble/callout with a long press gesture on a song in my Music app on iPhone 4 (iOS 5.0.1).
Does anyone found it and can help me to add this feature on other table view ?
Okay This is quite simple but only if you have a little experience with iOS programming. The absolute first step would be to setup your app to receive what is called a gesture recognizer.
In this case the gesture is called "UILongPressGestureRecognizer" a subclass of UIGestureRecognizer. The "UILongPressGestureRecognizer" has has 4 properties you can setup:
minimumPressDuration
numberOfTouchesRequired
numberOfTapsRequired
allowableMovement
For more detailed information see the class reference link: http://developer.apple.com/library/IOs/#documentation/UIKit/Reference/UIGestureRecognizer_Class/Reference/Reference.html#//apple_ref/c/econst/UIGestureRecognizerStateBegan
To see how others are implementing the gesture see this link: UILongPressGestureRecognizer gets called twice when pressing down
Now after you have setup to receive the gestures all you need to do is display a view, within that view you could place a callout bubble like the iPod app or you could place anything you like.
If the view will always be in one location that you can do this in Xcode, just setup a small view, set it hidden and when the gesture is recognized you can animate the view to turn on just like the iPod App.
If you want the view to pop up where the users finger touches the screen, then you will need to do a little more work to detect where on the screen the user touched. From there you would use that point location to alloc a UIView.
Now if you programmed before this should be somewhat easy to setup, if you need a more detailed explanation let me know.