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:

    When we of the so-called better classes are scared as men were never scared in history at material ugliness and hardship; when we put off marriage until our house can be artistic, and quake at the thought of having a child without a bank-account and doomed to manual labor, it is time for thinking men to protest against so unmanly and irreligious a state of opinion.
    William James (1842–1910)

    By his very success in inventing labor-saving devices, modern man has manufactured an abyss of boredom that only the privileged classes in earlier civilizations have ever fathomed.
    Lewis Mumford (1895–1990)

    Between richer and poorer classes in a free country a mutually respecting antagonism is much healthier than pity on the one hand and dependence on the other, as is, perhaps, the next best thing to fraternal feeling.
    Charles Horton Cooley (1864–1929)