¿Cómo acceder a la implementación predeterminada en la categoría?

In inheritance we used to call [super methodName] to call default implementation.

Like wise: How to access default implementation in category?

preguntado el 12 de febrero de 14 a las 06:02

why do you need default implementation on category? category generally used for adding some additional functionalities to the existing class..You better to use inheritance for default implementation purpose. -

Take for an example you have an UIAlertView which needs to be handled via bluetooth External keyboard, On -[UIAlertview show] method i need to write some additional handling code along with default functionality which I m doing with use of categories. -

1 Respuestas

The categories do not allow accessing default implementation. Possible solution can be achieved with método swizzling. Using that approach you can change selectors mapping in runtime and call default mapped implementation whenever you need.

Respondido 12 Feb 14, 07:02

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.