top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How to use @selector for UIButton add target in SWIFT

+1 vote
1,508 views

How to use below code in swift.

[actionBtn addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
posted Aug 6, 2014 by Shiva

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
+2 votes

I created custom view class.

import UIKit

class CustomView: UIView {

    init(frame: CGRect) {
        super.init(frame: frame)
        // Initialization code
    }

    /*
    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    override func drawRect(rect: CGRect)
    {
        // Drawing code
    }
    */

}

But i don't know how to include created custom view in Storyboard because i heard that we can add custom views in storyboard design.

+1 vote

How to use default values for parameter in function. What will happens when value is not passed for a default parameters.

0 votes

I want to know how to make cross bridging to use SWIFT in Objective C class

+2 votes

I am facing situation to use objective c class in SWIFT. So, i am looking for any instruction to achieve this

0 votes

How to declare , set message and show alert in SWIFT.

...