WHAT IS POSING IN IOS?

Tarun Kumar

Total Post:107

Points:535
Posted by  Tarun Kumar
 2446  View(s)
Ratings:
Rate this:
  1. Tarun Kumar

    Post:107

    Points:535
    What is posing in iOS?

    Objective-C permits a class to entirely replace another class within an application. The replacing class is said to “pose as” the target class. All messages sent to the target class are then instead received by the posing class. There are some restrictions on which classes can pose:

    ·         A class may only pose as one of its direct or indirect superclasses

    ·         The posing class must not define any new instance variables which are absent from the target class (though it may define or override methods).

    ·         No messages must have been sent to the target class prior to the posing.

    Posing, similarly to categories, allows globally augmenting existing classes. Posing permits two features absent from categories:

    ·         A posing class can call overridden methods through super, thus incorporating the implementation of the target class.

    ·         A posing class can override methods defined in categories.

      Modified On Aug-06-2015 11:22:02 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!