Highlighting a UIControl subclass


basically I need an image button, specifically a custom object that:
1) вызывает действие контроллера при нажатии
2) инкапсулирует пользовательские данные
3) автоматически перемещается представлением оболочки (не актуально)

Что ж, я получил все это с подклассом UIControl (поскольку подкласс UIButton не рекомендуется, а подкласс ) UIImageView затрудняет управление точкой 1). Но как правильно это выделить? I would like to highlight the control when tapped in any way (even a simple momentary reduction of alpha).

With beginTrackingWithTouch and endTrackingWithTouch I can't recognize the only UIControlEventTouchUpInside event.

A view animation in the controller? It seems to me a rough solution

Is there a simple and immediate solution?

Thanks :(

18
задан user370773 13 December 2010 в 11:41
поделиться