tags:

views:

141

answers:

1

I want to pop up a view when user touch on the screen,it is just like a tableview cell with disclosure accessory button.It has text showing message and when the user press the accessory button,it will take some action.

I have seen a similar example in iphone cookbook, it create a UICalloutView:UIControl, but it seems that it uses some private API.

can anyone tell me how to achieved this?

A: 

Well, it's probably private. You could printScrn the accessory and add it as a resource to your project, and use it as an image.

natanavra
well, the problem is how to catch the user touching the accessory?
beof
Create the accessory as a UIImageView, and add it to your view. Next, when a touch is being detected you could check whether the touched view is your accessory view via [touch view] or use the CGRectContainsPoint method, to see if the touch's location is inside the accessory UIImageView.Hope that helps,~ Natanavra.
natanavra