objective c - iOS - Tap specific area in UIImageView and perform the action -
i have uiimageview
of floor plan , client wants when click specific area in floor plan, display interior image of area... don't have problem displaying area when clicked. problem area clicked itself. @ initial implementation: (i don't know if it's proper way)
master bath area has excess place put button in it, when user tap area, i'll perform action display interior image... same in "walk-in closet" area, have 2 buttons.
so, there way optimize implementation?
one option use uitapgesturerecognizer
imageview,then when gesture fired
- (ibaction)tap:(uitapgesturerecognizer*)sender { cgpoint touchpoint = [sender locationinview:yourimageview]; //then decide point in area different action }
Comments
Post a Comment