4

In a right-aligned textfield, when it is edited, the text shift 1px to the left compared to the placeholder text's position. This doesn't happen on the simulator, only on a device (iPad in this case). Is this a known bug? Is there a way to fix to it?

There was a similar bug here but I am not using custom font, just a System font.

Community
  • 1
  • 1
pixelfreak
  • 17,714
  • 12
  • 90
  • 109

1 Answers1

2

I've experienced this before and I think its actually an iOS bug. Anyway apple provides two methods you can override in UITextField. Hope it helps.

- (CGRect)textRectForBounds:(CGRect)bounds;
- (CGRect)placeholderRectForBounds:(CGRect)bounds;
Shaps
  • 91
  • 8