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:

    “Of all classes the rich are the most noticed and the least studied.”
    —John Kenneth Galbraith (b. 1908)

    “The most powerful lessons about ethics and morality do not come from school discussions or classes in character building. They come from family life where people treat one another with respect, consideration, and love.”
    —Neil Kurshan (20th century)

    “My plan of instruction is extremely simple and limited. They learn, on week-days, such coarse works as may fit them for servants. I allow of no writing for the poor. My object is not to make fanatics, but to train up the lower classes in habits of industry and piety.”
    —Hannah More (1745–1833)