1
2015-05-02 23:56:34.047 TapIt WatchKit Extension[1398:18615] b: <WKInterfaceButton: 0x6080000580c0>
2015-05-02 23:56:34.048 TapIt WatchKit Extension[1398:18615] sender: (null)

- (IBAction)tapped:(id)sender {
    bool success = false;
    NSLog(@"b: %@", b);
    NSLog(@"sender: %@", sender);

Why is this coming through nil?

quantumpotato
  • 9,637
  • 14
  • 70
  • 146

1 Answers1

8

WatchKit actions don't include the sender as an argument. That's why you're seeing nil. In this case, your method should really just be - (IBAction)tapped.

Mike Swanson
  • 3,337
  • 1
  • 17
  • 15