Py Obj C - Classes

Classes

Objective-C classes are subclassed in the same manner as a normal Python class:

class MyDuck(NSObject): # NSObject is a base Objective-C class. def init(self): self = super(MyDuck, self).init # An Objective-C idiom, wherein the # subclass instance, self, is instantiated # by sending the superclass its # designated initializer. return self myLittleDuckOne = MyDuck.alloc.init

Read more about this topic:  Py Obj C

Famous quotes containing the word classes:

    The difference between people isn’t in their class, but in themselves. Only from the middle classes one gets ideas, and from the common people—life itself, warmth. You feel their hates and loves.
    —D.H. (David Herbert)

    Genocide begins, however improbably, in the conviction that classes of biological distinction indisputably sanction social and political discrimination.
    Andrea Dworkin (b. 1946)

    I have no doubt but that the misery of the lower classes will be found to abate whenever the Government assumes a freer aspect and the laws favor a subdivision of Property.
    James Madison (1751–1836)