I want to fire event from objective C to Titanium using hyperloop.
I found how to do that from Titanium iOS module : https://ti-qa-archive.github.io/question/51751/how-to-fire-an-event-in-a-module-and-catch-it-in-js.html.
The documentation states "TiModule is a subclass of TiProxy which provides the fireEvent methods" but TiModule is not present in my class.
The interface in my .h file implements UIViewController instead of TiModule or TiProxy.
Thank you
Related
I have changed from Obj-c to swift. However in my view controller identity inspector, only Obj-c files are available when I try to set the custom class.
Any ideas how to get the Swift files to appear?
My issue was that my class was a subclass of UIViewController despite it being a UITableView. Changing this in the class worked.
how to call a class that's not in xcode's interface builder?
I am calling QTMovieView on xcode 6 and xcode 6 doesn't have it in the interface builder
my mac app requires that it should install and play movies on 10.6 and later
here's what i've done
I added an object to the View Controller and name it as QTMovieView
and I've connected the property movieView to the QTMovieView.
IS this correct
You will need to compile against the 10.5 SDK.
I am new to programming for Mac (not iOS but OS X) and so have run into a problem. The template providing a document based application doesn't come with an appDelegate class. Only class provided and used is the NSDocument subclass.
My Problem: Where do I put the - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender (or equivalent) method I need in order to call a NSAlert? If I place it into my NSDocument subclass, it never gets called.
Thanks for any help.
Solved it! Just had to implement my own AppDelegate class (however I didn't know how to do this. I just looked in a test app (non document base) how it goes).
Also, I looked here: X-Code Interface Builder Not showing App Delegate Object
Sorry if my question looks noob, im new in objective c programming. Im using 4.6 xcode, and when i started to make new built in tab project, then I started to add new UIViewController subclass file, i cant find it. If the template is changed, which template that can provide 3 file (.h, .m, .xib) same with UIViewController. Answer will be appreciate. thanks
Choose the Objective-C class template from the Cocoa Touch section. On the next page, select or type UIViewController in the "Subclass Of" field. Make sure "With XIB for user interface" is checked.
I have a QTMovieView control on my cocoa window and it's working great with movies.
Now I want to intercept key down / up events to control the video as I like.
I created a MyMovieView class derived from QTMovieView like this
#interface MyMovieView : QTMovieView
-(BOOL)acceptsFirstResponder;
-(void)keyDown:(NSEvent*)theEvent;
#end
and the code that implements it.
I tried to insert the class name "MyMovieView" into the "Custom Class" field of the Interface Builder inspector for the control QTMovieView but seems like after I close the interface builder, the class gets lost and the "Custom Class" field doesn't remember MyMovieView class.
Am I getting something wrong with the subclass mechanism? I'm a Cocoa newbie
Your code looks fine to me, I took it and shove it in a basic Xcode project with just an NSLog in the keyDown method which logs the key that was pushed. Here is a link to the the Project.