UIAlertview에 3 개의 버튼과 1 개의 텍스트 필드를 배치해야합니다. 이런 코드를 썼다.텍스트 필드와 버튼으로 UIAlertview를 표시하는 중 문제가 발생했습니다.
UIAlertView *share = [[UIAlertView alloc] initWithTitle:@"Refresh" message:nil delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", @"Contacts", nil];
share.tag = 2;
[share setDelegate:self];
[share setTitle:@"Enter Name"];
[share setMessage:@" "];
nameField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)];
[nameField setBackgroundColor:[UIColor whiteColor]];
[nameField setKeyboardType:UIKeyboardTypePhonePad];
[share addSubview:nameField];
[share show];
[share release];
[nameField release];
그러나 like this이 표시됩니다.
두 개의 버튼을 배치하면 잘 표시됩니다.
새로운 버튼을 추가하면 위의 링크와 같이 다음 행에 추가됩니다.
하지만 3 개의 버튼을 모두 하나의 열에 표시해야합니다.
어떻게하면됩니까?
메시지를 nil하지만 변경하지 않으려 고합니다. 나는 수직으로 하나의 열에 수평으로 버튼이 필요하다 ... u pls는 u r 대답을 편집 할 수있다. – MaheshBabu
나는 나의 대답을 업데이트했다;) 그것을 보라. – nacho4d
나의 다른 요구 사항과 비슷한 다른 방법이 있는가? – MaheshBabu