You need some form of input method like a UITextField
in which you can input a name for your button. If you want, you could create a UIButton
that shows the textField (have it hidden by default) and makes it first responder by doing:
textField.hidden = NO;
[textField becomeFirstResponder];
Once you enter something you want in your text field, you can make it so the keyboard disappears, the textfield is hidden, and the UIButton
text is changed to the text entered.
-(BOOL)textFieldShouldReturn:(UITextField*)textField; {
textField.hidden = YES;
[textField resignFirstResponder];
[yourButton setTitle:textField.text forState:UIControlStateNormal];
}