Creating and Subclassing Objective-C Class
darmie opened this issue · comments
'Damilare Darmie Akinlaja commented
Hi, I like your effort to bridge NodeJS and Objective-C. I looked at NativeScript's Documentation and I can see that Objective-C class can be subclassed or extended. I would like to achieve something similar using NodObjC.
var MyAppDelegate = UIResponder.extend({
// Implement a method from UIApplicationDelegate.
// We will obtain the method signature from the protocol.
applicationDidFinishLaunchingWithOptions: function (application, launchOptions) {
this._window = new UIWindow(UIScreen.mainScreen().bounds);
this._window.rootViewController = MyViewController.alloc().init();
this._window.makeKeyAndVisible();
return true;
}
}, {
// The name for the registered Objective-C class.
name: "MyAppDelegate",
// Declare that the native Objective-C class will implement the UIApplicationDelegate Objective-C protocol.
protocols: [UIApplicationDelegate]
});
'Damilare Darmie Akinlaja commented
Oh, I just read the Wiki again and found it! Thanks!