title: How to set UITextfield width dynamically?
body: <p>I have to make iPad application.</p>
  
  <p>There are three questions <code>textfields</code>. I have to set width <code>UITextField</code> dynamically, <code>text</code> is coming from <strong>webservice</strong>. and I have to set <code>UITextField</code> width same as questions text..</p>
  
  <p>when texts question size is small then <code>UITextField</code> size is small, 
  when texts question size is large then <code>UITextField</code> size is large,</p>
  
  <p>I have following code.....</p>
  
  <pre><code>txtQuestionOne.hidden=NO;
              txtQuestionTwo.hidden=NO;
              txtQuestionThree.hidden=NO;
  
              imgQueone.hidden=NO;
              imgQueTwo.hidden=NO;
              imgQueThree.hidden=NO;
  
              [txtQuestionOne setPlaceholder:[[appDelegate.questions objectAtIndex:0] objectForKey:@"question"]];
  
              appDelegate.FirstQues =[[appDelegate.questions objectAtIndex:0] objectForKey:@"question"];
  
              NSLog(@"current q1 %@", [[appDelegate.questions objectAtIndex:0] objectForKey:@"question"]);
  
  
              if ([[[appDelegate.questions objectAtIndex:0] objectForKey:@"permission"] isEqualToString:@"1"]) {
  
                  ratingButton1.hidden=NO;
  
                  ratingLabel1.hidden=NO;
              }
  
  
              [txtQuestionTwo setPlaceholder:[[appDelegate.questions objectAtIndex:1] objectForKey:@"question"]];
  
              appDelegate.SecondQues =[[appDelegate.questions objectAtIndex:1] objectForKey:@"question"];
  
              NSLog(@"current q2 %@", [[appDelegate.questions objectAtIndex:1] objectForKey:@"question"]);
  
              if ([[[appDelegate.questions objectAtIndex:1] objectForKey:@"permission"] isEqualToString:@"1"]) {
  
                  ratingButton2.hidden=NO;
  
                  ratingLabel2.hidden=NO;
              }
  
  
              [txtQuestionThree setPlaceholder:[[appDelegate.questions objectAtIndex:2] objectForKey:@"question"]];
  
              appDelegate.ThridQues =[[appDelegate.questions objectAtIndex:2] objectForKey:@"question"];
  
              NSLog(@"current q3 %@", [[appDelegate.questions objectAtIndex:2] objectForKey:@"question"]);
  
              if ([[[appDelegate.questions objectAtIndex:2] objectForKey:@"permission"] isEqualToString:@"1"]) {
  
                  ratingButton3.hidden=NO;
  
                  ratingLabel3.hidden=NO;
              }
  </code></pre>
  
  <p>Please help me i dont know what can i do?</p>