Selector syntax for swift 3.0

<>

This question already has an answer here:

Answers


Add target like,

should now be written as #selector(buttonTapped(sender:)) or use #selector(buttonTapped(_:))

btnAll.addTarget(self, action: #selector(buttonTapped(_:)), for: .touchUpInside)

then change your function like,

@objc func buttonTapped(_ sender : UIButton){

 ....
 }

You can do it this way:

btnAll.addTarget(self, action: #selector(buttonTapped(sender:)), for: .touchUpInside)

Need Your Help

Placing a textview on top of imageview in android

android textview android-imageview

I have a listview, that has a single imageview which is

Difference between XPath, XQuery and XPointer

xml xpath xquery

What is the difference between XPath, XQuery and XPointer? As far as I know, XQuery is an extended version of XPath. I have some basic knowledge of XPath. Is there any feature available in XPath wh...