Contents

조회 수 46180 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
481 Develop [c/c++] Makefile 사용하기.. ㅋㅋ hooni 2003.04.23 7389
480 Develop [js] 빈도우즈(bindows96) file hooni 2013.04.23 7390
479 Develop [c] 스택/힙 오버플로우 테스트(overflow) file hooni 2003.04.23 7390
478 Develop [c] 게임 AI FSM 테스트 샘플 소스.. 꽤 괜찮은 소스.. file hooni 2013.04.23 7394
477 Develop [c] 농구팀 점수 산출 프로그램 소스 file hooni 2003.04.23 7404
476 Develop [c] 문자열 치환해주는 str_replace() 함수 file hooni 2013.04.23 7409
475 Develop [c] KNN(K-nearest neighbor) 패턴인식 과제.. file hooni 2013.04.23 7410
474 Develop [jsp][php] LDAP 프로그래밍.. file hooni 2003.04.23 7413
473 Develop [php] 무조건 다운로드 받도록 header 세팅 file hooni 2013.04.23 7415
472 Develop [c] 시간(요일,날짜 포함) 출력하는 프로그램 초간단 코드 hooni 2013.04.23 7417
471 Develop [c++] mfc로 만든 월플렉스 멀티 수납 시스템(2D기반 설계) file hooni 2013.04.23 7422
470 Develop [js] 자바스크립트 메뉴얼 사이트.. ㅋㅋ hooni 2013.04.23 7426
Board Pagination Prev 1 ... 26 27 28 29 30 31 32 33 34 35 ... 71 Next
/ 71