From 84e63761dcc080a6ed89cdfcd675ee320a7f811d Mon Sep 17 00:00:00 2001 From: Andreas Linde Date: Tue, 4 Jun 2013 15:10:57 +0200 Subject: [PATCH] Adjust size of name and email textfields in feedback UI Now resizes with device rotation on non iPad and uses max width on both device types. --- Classes/BITFeedbackUserDataViewController.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Classes/BITFeedbackUserDataViewController.m b/Classes/BITFeedbackUserDataViewController.m index a36093dbf8..3c4580643e 100644 --- a/Classes/BITFeedbackUserDataViewController.m +++ b/Classes/BITFeedbackUserDataViewController.m @@ -200,7 +200,10 @@ cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.backgroundColor = [UIColor whiteColor]; - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, 185, 30)]; + UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(110, 10, self.view.frame.size.width - 110 - 35, 30)]; + if (UI_USER_INTERFACE_IDIOM() != UIUserInterfaceIdiomPad) { + textField.autoresizingMask = UIViewAutoresizingFlexibleWidth; + } textField.adjustsFontSizeToFitWidth = YES; textField.textColor = [UIColor blackColor]; textField.backgroundColor = [UIColor lightGrayColor];