Contents

조회 수 46115 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

UIAlertView와 Delegate 함수 초간단 샘플~


//경고창 1.
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"A"
                        message:@"" delegate:self
                        cancelButtonTitle:@"확인"
                        otherButtonTitles:@"취소", nil];
[alert show];
[alert release];


//경고창 2
UIAlertView *alert =[[UIAlertView alloc]initWithTitle:@"B"
                        message:@"" delegate:self
                        cancelButtonTitle:@"확인"
                        otherButtonTitles:@"취소", nil];
[alert show];
[alert release];


//경고창 3
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"C"
                        message:@"" delegate:self
                        cancelButtonTitle:@"확인"
                        otherButtonTitles:@"취소", nil];
[alert show];
[alert release];


//경고창의 버튼 이벤트를 감지하는 델리게이트.
- (void)alertView:(UIAlertView *)alertView
    didDismissWithButtonIndex:(NSInteger)buttonIndex
{
    //경고창의 타이틀을 비교해서 경고창을 구별한다.
    if ( [[alertView title] isEqualToString:@"A"])
    {
        if(buttonIndex==0){
        
        }else {
            
        }
    
    }
    
    else if ( [[alertView title] isEqualToString:@"B"]) 
    {
        if(buttonIndex==0){
            
        }
    }
    else if ( [[alertView title] isEqualToString:@"C"]) 
    {
        if(buttonIndex==0){
            
        }
    }
    
}


?

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
381 Develop [c] 최대공약수, 최소공배수, 서로소 구하기 (펌) hooni 2013.04.23 11160
380 Develop [c] 최대공약수 알고리즘 (유클릿) hooni 2003.04.23 8873
379 Develop [c] 최단거리 알고리즘 & 예제소스.. 13 file hooni 2013.04.23 10171
378 Develop [c] 지폰(gphone) 소스.. 수정(암호화) file hooni 2013.04.23 7434
377 Develop [c] 지나가는 패킷 잡기 hooni 2003.04.23 8802
376 Develop [c] 정수를 2진수로 변환 (재귀,비트연산) file hooni 2003.04.23 7581
375 Develop [c] 정사각배열의 서브 배열의 최대 값 구하기 file hooni 2003.04.23 7022
374 Develop [c] 전위 표기법으로 연산 예제.. file hooni 2013.04.23 9304
373 Develop [c] 재미있는 코딩.. file hooni 2003.04.23 21316
372 Develop [c] 자료구조 그래프(graph) 소스코드 - 확인해볼 것.. file hooni 2013.04.23 7994
371 Develop [c] 이진트리/트리 순회법 코드(전위/중위/후위) 5 file hooni 2015.07.02 20926
370 Develop [c] 이진트리(binary tree)의 특성 file hooni 2003.04.23 9608
Board Pagination Prev 1 ... 62 63 64 65 66 67 68 69 70 71 ... 98 Next
/ 98