How to make the text input to start after some space in textfield in iPhone?
            Asked
            
        
        
            Active
            
        
            Viewed 1,821 times
        
    0
            
            
        - 
                    2You need to create a `UIView` of width say 5, and give `UITextField`'s `leftView` as that view. Explained better here - http://stackoverflow.com/a/4423805/876283 – iNoob Jun 29 '12 at 08:49
- 
                    Do you want leading spaces in your textfield, with the cursor placed after the spaces upon selection? – Eitan Jun 29 '12 at 13:13
1 Answers
4
            
            
        try this
- (void) textFieldDidBeginEditing:(UITextField *)textField {
UIView *paddingView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 5, 20)];
textField.leftView = paddingView;
textField.leftViewMode = UITextFieldViewModeAlways;
}
hope this help to you..
 
    
    
        Ayaz
        
- 1,398
- 15
- 29
 
    