Tag: events

Prevent tap event on UITextView

2012-02-21 11:59:18.106 textView[20977:fe03] ; target= <(action=delayed:, target=)>> 2012-02-21 11:59:18.107 textView[20977:fe03] ; target= <(action=handlePan:, target=)>> 2012-02-21 11:59:18.108 textView[20977:fe03] ; target= <(action=oneFingerTripleTap:, target=)>; numberOfTapsRequired = 3> 2012-02-21 11:59:18.108 textView[20977:fe03] ; target= <(action=oneFingerDoubleTap:, target=)>; numberOfTapsRequired = 2> 2012-02-21 11:59:18.109 textView[20977:fe03] ; target= <(action=twoFingerSingleTap:, target=)>; numberOfTouchesRequired = 2> 2012-02-21 11:59:18.123 textView[20977:fe03] ; target= <(action=tapAndAHalf:, target=)>> 2012-02-21 11:59:18.124 textView[20977:fe03] ; […]

target-action uicontrolevents

I must be missing something obvious here but … UIControl has a method – (void)addTarget:(id)target action:(SEL)action forControlEvents: (UIControlEvents)controlEvents which lets you add an action to be called when any of the given controlEvents occur. ControlEvents are a bitmask of events which tell you if a touch went down, or up inside, or was dragged etc., […]

Selectors or Blocks for callbacks in an Objective-C library

Question We’re developing a custom EventEmitter inspired message system in Objective-C. For listeners to provide callbacks, should we require blocks or selectors and why? Which would you rather use, as a developer consuming a third party library? Which seems most in line with Apple’s trajectory, guidelines and practices? Background We’re developing a brand new iOS […]

Obj-C: Why is my NSTextField subclass having an effect on objects I haven't assigned to it?

I have an NSPanel with about 4 different NSTextField’s on it. I’m looking at getting the usual cut, copy, paste, selectAll working for some of the fields. The best solution I’ve found appears to be here: http://web.archive.org/web/20100126000339/http://www.cocoarocket.com/articles/copypaste.html The AXCVHandler becomes a subclass of NSTextField. On my NSPanel in interface builder if I change a single […]

Receiving touch events on more then one UIView simultaneously

I have a bunch of UIViews stacked one upon the other(not nested). I want them all to react to touch, but it seems that the topmost view obscures the views beneath it, preventing them from receiving touch events. At first i thought i’d catch all touch events with the topmost view, and then manually call […]

Can we fire an event when ever there is Incoming and Outgoing call in iphone?

Can I fire an event when ever there is Incoming and Outgoing call ends on iphone? Axample of an event is calling a webservice .

Can you call a javascript function from native code (not in a callback) using PhoneGap and iOS?

I’m hoping to be able to use PhoneGap for my app. I will have to build a custom protocol/plugin so that I can call Native methods from the Javascript. I know you can call a success function in the Javascript when the native code returns. What I need to be able to do is call […]

Simulate touch on iphone

Im trying to simulate a touch on as UIWebView, how can I programmatically fire a touch event at a certain location? (x and y coordinates) Just call touchesBegan? Ideally I’d like to do it without any javascript hack because in the future it may not be a uiwebview

Get 'Touch Drag Inside' Distance When Setting IBAction From Storyboard

I know how to set UIPanGesture events and recognizers and get the data I need when I create them programatically. However I am trying to learn how to work with the storyboard and use IBOutlets. I have dragged over an IBAction for ‘Touch Drag Inside’. @IBAction func dragButtonDragEvent(sender: AnyObject) { println(sender) } The problem is […]

Get keyDown event for an NSTextField

In xcode last version, I am trying to get the keyDown event of an NSTextField. However, despite following multiple tutorials on the internet (delegates, controllers…), I still can’t receive it. Any easy hint for me ? Thanks !