My question is this,
I have a UITextField that has a background image applied to it through IB, I am attempting to move the margin of the left side in 10px. However when i do the following, the background image moves with the text. Any thoughts?
textField.bounds = [self editingRectForBounds:textField.bounds];
textField.bounds = [self textRectForBounds:textField.bounds];
- (CGRect)textRectForBounds:(CGRect)bounds {
CGRect inset = CGRectMake(bounds.origin.x + 10, bounds.origin.y, bounds.size.width - 10, bounds.size.height);
return inset;
}
- (CGRect)editingRectForBounds:(CGRect)bounds {
CGRect inset = CGRectMake(bounds.origin.x + 10, bounds.origin.y, bounds.size.width - 10, bounds.size.height);
return inset;
}