UITextField edge insets

2 comments on UITextField edge insets

Written by

in

To change edge insets in UITextField, create a new subclass and override these methods:

// placeholder position
- (CGRect)textRectForBounds:(CGRect)bounds {
    return CGRectInset(bounds, 0, 10);
}

// text position
- (CGRect)editingRectForBounds:(CGRect)bounds {
    return CGRectInset(bounds, 0, 10);
}

Here 0 is dx, 10 is dy.

Found this nice solution here

Comments

2 responses to “UITextField edge insets”

  1. cheap polo ralph lauren clothing Avatar

    ralph lauren factory outlet san francisco
    cheap polo ralph lauren clothing http://www.oneparkplacekc.com/poloralphlauren.php

    1. anonymous Avatar
      anonymous

      get away!!!!

Leave a Reply

Your email address will not be published. Required fields are marked *