How to Rename the Decline Button on the iPhone
The iPhone SDK lets you programmatically set the title for the buttons on an iPhone app. You change the title using the "setTitle" function in your iPhone program. You rename the "Decline" button to customize the way your app works for the user. After you change the button's text, you run the code in the iPhone SDK debugger, so you can test for any accidental bugs after changing the code.
Instructions
-
-
1
Open the Xcode editor on your iPhone programming desktop and open the project in which you want to set the button's title. Open the source code file for the app.
-
2
Set the button's title. The following code changes the decline button's text using the "setTitle" function:
[decline setTitle:@" C
New Button Text" forState:UIControlStateNormal]; -
-
3
Save the changes to the source code file and click "Run" to execute the code in the iPhone emulator. The project runs in the debugger, so you can check for any syntax or logic errors.
-
1