Assigning a selector via SEL type?
Posted
by fuzzygoat
on Stack Overflow
See other posts from Stack Overflow
or by fuzzygoat
Published on 2010-06-07T15:07:41Z
Indexed on
2010/06/07
15:22 UTC
Read the original article
Hit count: 275
I just spotted the following in an online tutorial. It showed 001 as a method for assigning a selector, however I could not get this to work. Am I right in thinking that 001 is not right and 002 is the correct way, or am I doing something wrong with 001?
// 001
SEL mySel = [self something];
// 002
SEL mySel = @selector(something);
.
-(void)something {
NSLog(@"YAY");
}
Gary
© Stack Overflow or respective owner