4

what is the diffrents between those two? What is Selector,and what is #selector

enter image description here enter image description here

Kyle Bing
  • 169
  • 1
  • 15

1 Answers1

5

Both are same things, the purpose of #selector() syntax is to save you from the possible error in having to write a selector as a literal string, which is error-prone.

Baig
  • 4,297
  • 27
  • 46
  • 2
    `Selector()` is old, only fill with String, can't check syntax error, but `#selector` is new, and it works like real class. – Kyle Bing Sep 06 '17 at 10:39