Top "Selector" questions

A selector can be a string identifying a method name in the Objective-C or Smalltalk programming language or a special kind of switch used in computers to connect multiple lines (I/O) to a single line.

Objective-C passing methods as parameters

How do you pass one method as a parameter to another method? I'm doing this across classes. Class A: + (void)…

iphone objective-c ios xcode selector
javascript selectors

How does one select DOM elements in javascript? Like for example: <div class="des"> <h1>Test&…

javascript dom selector traversal
How do I resolve "ambiguous use of" compile error with Swift #selector syntax?

[NOTE This question was originally formulated under Swift 2.2. It has been revised for Swift 4, involving two important language changes: the …

swift selector
UITapGestureRecognizer selector, sender is the gesture, not the ui object

I have a series of imageviews that I identify using their tag. I have added a single tap gesture to …

objective-c ios selector gestures
Objective-C: How to call performSelector with a BOOL typed parameter?

Is there any way to send a BOOL in selector ? [self performSelector:@selector(doSomething:) withObject:YES afterDelay:1.5]; Or I should …

objective-c iphone selector nsinvocation
JQuery Selector on Dynamically Added Element

I can't figure out how to coax JQuery in to selecting an element (not binding handlers) that is dynamically inserted …

jquery selector
Android LinearLayout Selector background color

Hi I'm trying to make my linear layout work like button. I mean I'm trying to change its background color …

android layout colors background selector
"Press and hold" button on Android needs to change states (custom XML selector) using onTouchListener

I've got a button graphic which needs to have "press and hold" functionality, so instead of using onClickListener, I'm using …

android selector ontouchlistener onclicklistener
Is there a css selector to match a option value of the select tag?

For example: <select> <option value="one">1</option> <option value="two">2</option&…

css selector
How do I call performSelectorOnMainThread: with an selector that takes > 1 arguments?

A typical call to performSelectorOnMainThread: looks like this: [target performSelectorOnMainThread:action withObject:foo waitUntilDone:NO]; where "result" is an argument …

iphone cocoa-touch selector