iPad 응용 프로그램을 만들어야합니다.UITextfield 너비를 동적으로 설정하는 방법은 무엇입니까?
세 가지 질문이 있습니다 (textfields
). 동적 너비 UITextField
을 설정해야합니다. text
은 웹 서비스에서옵니다. 나는
텍스트 크기가 작은 다음 UITextField
크기가 작이다 질문, 는 텍스트 내가 코드를 다음 한
, 크기가 큰 다음 UITextField
크기가 큰 인 질문을 할 때 .. 질문 텍스트로 UITextField
폭을 동일하게 설정해야 .....
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;
}
내가 무엇을 할 수 있는지 알고 싶지 않으십니까?
왜'UILabel'을 대신 사용하지 않는? – Maulik