title: Swift UIButton and IBAction crashing in Objective C
body: <p>I am creating a reachability alert that I wrote in Swift and is being called in the app that is written originally in objective C. I have all my bridged-header-.h  setup correctly. The problem is happening when I click on a UIButton created in Swift and an IBAction that is also written in swift. below is the error and code. Is there a way to prevent this crash?</p>
  
  <p><strong>Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNotificationQueue buttonTapped:]: unrecognized selector sent to instance 0x7ae602d0'</strong></p>
  
  <pre><code>//  NetworkErrorView.swift
  
  
  import Foundation
  import UIKit
  
  
  
  @objc class NetworkErrorView: NSObject {
  
      var xCoordinate:CGFloat = 0
      var yCoordinate: CGFloat = 0
      var width: CGFloat = 0
      var height: CGFloat = 0
      var reTryButton = UIButton()
  
  
  func renderAlertView() -&gt; UIView  {
  
      let alert = UIAlertView()
      alert.title = "Connection Failed"
      alert.message = "Your device is not connected to the Internet. Please try again later."
      alert.addButtonWithTitle("OK")
      alert.show()
      return alert
  
      }
  
  
  func renderReTryButton() -&gt; UIView {
  
      var buttonImage = UIImage(named: "Btn-Try-Again@2x.png")
      reTryButton.addTarget(self, action: Selector("buttonTapped:"), forControlEvents: UIControlEvents.TouchUpInside)
      reTryButton.setBackgroundImage(buttonImage, forState: UIControlState.Normal)
      reTryButton.frame = CGRect(x: 18, y: 470, width: 290, height: 30)
      println("stopes here")
      return reTryButton
  
      }
  
  
     @IBAction func buttonTapped (sender: AnyObject!) {
  
      let alertView = UIAlertView()
      alertView.title = "Connection Failed"
      alertView.message = "Your device is not connected to the Internet. Please try again later."
      alertView.addButtonWithTitle("OK")
      alertView.show()
  
      }
  
  func render() -&gt; UIView {
  
      var networkErrorView = UIView()
  
      let screenSize: CGRect = UIScreen.mainScreen().bounds
  
      let screenWidth = screenSize.width;
  
      let screenHeight = screenSize.height;
  
  if screenHeight == 480 {
  
      xCoordinate = 0
  
      yCoordinate = 74
  
      width = 320
  
      height = 361
  
      var imgNoConnection = UIImage(named: "Noconnectionz.png")
      networkErrorView = UIImageView(image: imgNoConnection)
  
      }
  
  else if screenHeight == 568 {
  
      xCoordinate = 0
  
      yCoordinate = 74
  
      width = 320
  
      height = 443
  
      var imgNoConnection = UIImage(named: "Noconnection@2x.png")
      networkErrorView = UIImageView(image: imgNoConnection)
  
      }
  
      return networkErrorView
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>here is where I am calling it in Objective C </p>
  
  <pre><code>Swift *connectivity = [[Swift alloc]init];
  bool swiftConnected = [connectivity reachability];
  
  if (!swiftConnected)  {
      NetworkErrorView *networkErrorView = [[NetworkErrorView alloc]init];
      [networkErrorView renderAlertView];
       UIView *subView = [networkErrorView render];
      [super.view addSubview: subView];
      [super.view addSubview:[networkErrorView renderReTryButton]];
  
      } 
     }
  </code></pre>