iphone - UITextField custom background view and shifting text -
I am trying to use a custom text file background. The problem is that the text looks very close to the left.
I have no way to change the text without subclassing the UITPlacefield. Therefore, I am trying to expand and overwrite
- (zero) drawTextInRect: (CGRact) rect {NSLog (@ "draw rect"); CGRector = CGRAtech (Rect.organ.20, Rect.org.org.i, Rectification.Withth-20, Rect. size.height); [Super drawTextInRect: newRect]; }
But for some reason the log never gets printed. I know that subclass is being used because I have a log in the int, and it prints fine.
Edit
Edit.
I Try
- (CGRact) Text Racket Fourbones: (CGRATAT) boundary {nslog (@ "seeds"); CGRTT B = [SuperTextReferenceBound: Border]; B.origin.x + = 20; Return b; }
This is actually a mark, but this is not being transferred
I think you can use the leftView
property for this.
You can be used to display an icon to these views to a UITextfield leftView
and rightView
, but if it's a blank The scene, this bus will take place, which you want.
CGFloat leftInset = 5.0f; UIView * leftView = [[UIView alloc] initWithFrame: CGRectMake (0.0f, 0.0f, leftInset, self.bounds.size.height)]; Self.leftView = leftView; Self.leftViewMode = UITextFieldViewModeAlways; [LeftView release];