title: What have I got wrong with these code blocks?
body: <p>I'm attempting to use Tony Million's Reachability within a new Swift based app.  I have it implemented in another app I wrote in Obj C, but I'm having issues with getting the proper syntax in Swift.  The code blocks are as follows:</p>
  
  <pre><code>override func viewDidLoad() {
      super.viewDidLoad()
      messageText.text = ""
  
      var reach: Reachability = Reachability(hostName: "www.apple.com")
  
      NSNotificationCenter.defaultCenter().addObserver(self, selector: "reachabilityChanged", name: kReachabilityChangedNotification, object: nil)
  
  
      reach.reachableBlock = Reachability()
      {
          dispatch_async(dispatch_get_main_queue(), {
              self.messageText.text = "Enter search criteria...";
              })
      }
  
      reach.unreachableBlock = Reachability()
      {
          dispatch_async(dispatch_get_main_queue(), {
              self.messageText.text = "Attempting to contact network...";
              })
      }
  
      reach.startNotifier()
  
  }
  </code></pre>
  
  <p>AND </p>
  
  <pre><code>func reachabilityChanged(note: NSNotification)
  {
  
      var reach: Reachability = Reachability()
      if(reach.isReachable())
      {
          messageText.text = "Enter search criteria...";
      }
      else
      {
          messageText.text = "Attempting to contact network...";
      }
  
  }
  </code></pre>
  
  <p>My issues are first, my "blocks" for "reachable" and "unreachable" are not the correct syntax and I'm at a loss for what is the proper syntax for these blocks.  My second issue is with the "reachabilityChanged" function.  I get an error stating "-[_TtC9icdDRPlus20SearchViewController reachabilityChanged]: unrecognized selector sent to instance" which I'm again at a loss.  Condsider my Obj C code as follows:</p>
  
  <pre><code>-(void)viewDidLoad
  {
  [super viewDidLoad];
  NSString *popUpShownOnce = @"YES";
  NSInteger swipeCount = 0;
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
  [defaults setObject:popUpShownOnce forKey:@"popDisplayed"];
  [defaults setInteger:swipeCount forKey:@"showswipearrows"];
  
  [[NSNotificationCenter defaultCenter] addObserver:self
                                           selector:@selector(reachabilityChanged:)
                                               name:kReachabilityChangedNotification
                                             object:nil];
  [[UIApplication sharedApplication] setStatusBarHidden:NO];
  
  Reachability * reach = [Reachability reachabilityWithHostname:@"somesite.com"];
  
  reach.reachableBlock = ^(Reachability * reachability)
  {
      dispatch_async(dispatch_get_main_queue(), ^{
          searchForText.placeholder = @"Enter search criteria...";
      });
  };
  
  reach.unreachableBlock = ^(Reachability * reachability)
  {
      dispatch_async(dispatch_get_main_queue(), ^{
          searchForText.placeholder = @"Attempting to contact network...";
      });
  };
  
  [reach startNotifier];
  }
  
  -(void)reachabilityChanged:(NSNotification*)note
  {
  Reachability * reach = [note object];
  
  if([reach isReachable])
  {
      searchForText.placeholder = @"Enter search criteria...";
  }
  else
  {
      searchForText.placeholder = @"Attempting to contact network...";
  }
  }
  </code></pre>
  
  <p>Assistance is greatly appreciated.  The questions are as follows:
  1.  What is the proper translation for the reachable and unreachable blocks from Obj C to Swift?
  2.  If my addObserver call is correct, why might I get the unrecognized selector error?  If not correct, what is the proper call?</p>
  
  <p>Thanks in advance.</p>