Created
June 15, 2010 18:32
-
-
Save ejknapp/439478 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Steps for making an Action (In Xcode 3!) | |
| 1. Open the .h file of the view controller. | |
| 2. After all properties, create a method declaration | |
| with "IBAction" as return value. | |
| -(IBAction)clickTheButton; | |
| 3. Copy the method declaration and switch to .m file. | |
| 4. Paste into .m file, remove semi-colon, add braces. | |
| 5. Code as needed. | |
| 6. Save .h and .m files. | |
| 7. Double-click on view controller nib file. (.xib) | |
| 8. Click on "Classes" tab of Library window. | |
| 9. Click on the button to select it. | |
| 10. Select Tools->Inspector menu item. Click on Connections tab (2nd tab). | |
| 11. Arrange IB windows so the Inspector and File's Owner are visible. | |
| 12. Click and drag from "Touch Up Inside" circle to "File's Owner". | |
| 13. Let go and select the correct action. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment