1

I have a button in Widget iOS8. How can I get event when button on click?

enter image description here

Andrew
  • 15,357
  • 6
  • 66
  • 101
quang thang
  • 1,023
  • 1
  • 10
  • 16

1 Answers1

3

After you setup the button, just add a target to the button as you would in your app. For example in viewDidLoad.

[yourButton addTarget:self action:@selector(yourMethod:) forControlEvents:UIControlEventTouchUpInside];
whyp
  • 603
  • 5
  • 14