문제

iPhone 응용 프로그램에서 UialertView에 6 개의 버튼이있는 것처럼 UialertView에서 열을 설정할 수 있습니다. 그러면 2 개의 열과 3 행으로 표시 할 수있는 방법은 어떻게 표시 할 수 있습니까? 만약 한 사람이라면 어떻게 할 것인지 친절하게 공유합니다 ..

모든 샘플 코드는 추가 도움이됩니다

도움이 되었습니까?

해결책

UIAlertView 그냥 a UIView. 따라서 버튼을 수동으로 추가 할 수 있습니다 UIAlertView 두 열 구성에서. 예가 있습니다 여기 그것은 추가를 보여줍니다 UITextFieldS, 그러나 나는 당신이 그것을 조정할 수 있다고 확신합니다.

두 개의 버튼이 있습니다 UIAlertView 애플이 백업 될 수있다 ;-)

다른 팁

나는 이렇게했다

NSArray *subViewArray = Topicdialog.subviews;
    float y = 60.0f;

    for(int x=2;x<[subViewArray count];x += 2){

        UIView *button = [subViewArray objectAtIndex:x];

        CGRect frame = button.frame;
        frame.size.width = 120.0f;
        frame.size.height = 42.0f;
        frame.origin.x = 20.0f;
        frame.origin.y = y;
        button.frame = frame;

        UIView *button1 = [subViewArray objectAtIndex:x + 1];

        frame = button1.frame;
        frame.size.width = 120.0f;
        frame.size.height = 42.0f;
        frame.origin.x = 152.0f;
        frame.origin.y = y;
        button1.frame = frame;
        y = y + 48.0f;
    }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top