1) Click on the storyboard that has the Button that you want to respond to.
2) Near the top right corner, you'll see a button that looks like a tux with a bow tie, entitled "Show the Assistant Editor". Click on that.
3) Make sure that the .m file is showing (e.g. ViewController.m)
4) Hold down control and drag the button from the storyboard down to the text editor which will create a new function. Type in a name for the function, such as "buttonTapped".
5) Click "Connect".
6) Now, fill in the callback function.
No comments:
Post a Comment