1

I have textfield cursor issue in iOS 5 where as in iOS 4 it is working fine.

The bottom text field is iOS 4 and top one is iOS 5. The starting space in the front is missing in iOS 5.

Can any one please help how can I fix this? The code is as follows:

- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier 
{
    if (self = [super initWithStyle:UITableViewStyleGrouped reuseIdentifier:reuseIdentifier]) 
    {
        // Set the frame to CGRectZero as it will be reset in layoutSubviews
        textField = [[UITextField alloc] initWithFrame:CGRectZero];
        textField.delegate=self;
        textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
        textField.returnKeyType            =UIReturnKeyDone;
        textField.textColor = [UIColor darkGrayColor];
        [textField setClearButtonMode:UITextFieldViewModeWhileEditing];
        [self.contentView addSubview:textField];
    }
    return self;
}
user564963
  • 2,284
  • 5
  • 24
  • 33

1 Answers1

0

You might try using textField.Placeholder to programatically set the string to see if that keeps the space?

TChadwick
  • 868
  • 10
  • 19