Skip to content

Commit

Permalink
Merge pull request #7838 from hansemannn/TIMOB-20550
Browse files Browse the repository at this point in the history
[TIMOB-20550] Fix autolayout issue with textfields
  • Loading branch information
pec1985 committed Mar 11, 2016
2 parents 6c1be46 + a18ec34 commit 123c6c3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions iphone/Classes/TiUITextField.m
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,15 @@ - (void) dealloc
if (textWidgetView==nil)
{
textWidgetView = [[TiTextField alloc] init];
#ifdef TI_USE_AUTOLAYOUT
[textWidgetView setTranslatesAutoresizingMaskIntoConstraints:NO];
#endif
((UITextField *)textWidgetView).delegate = self;
((UITextField *)textWidgetView).text = @"";
((UITextField *)textWidgetView).textAlignment = NSTextAlignmentLeft;
((UITextField *)textWidgetView).contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[(UITextField *)textWidgetView configure];
[(UITextField *)textWidgetView setTouchHandler:self];
[(TiTextField *)textWidgetView configure];
[(TiTextField *)textWidgetView setTouchHandler:self];
[self addSubview:textWidgetView];
self.clipsToBounds = YES;
WARN_IF_BACKGROUND_THREAD_OBJ; //NSNotificationCenter is not threadsafe!
Expand Down

0 comments on commit 123c6c3

Please sign in to comment.