По умолчанию установите выравнивание текста по левому краю.
Когда вы начнете вводить текстовое поле, этот делегат будет называться
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
//here again set the alignment value to center
textField.textAlignment=UITextAlignmentCenter;
}
Этот делегат будет вызываться, когда вы будете фокусироваться вне текстового поля
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
//Here check text in the textfield. if its nill set alignment as left.
//Becoz if there is no text in textfield placeholder will be shown.
}