Views 46108 Votes 0 Comment 0
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

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
No. Category Subject Author Date Views
677 Develop [c] 이진트리(binary tree)의 특성 file hooni 2003.04.23 9598
676 Develop [js] Closure를 이용해 캡슐화.. hooni 2013.12.16 9594
675 Develop [c++] 마방진 소스코드 file hooni 2013.04.23 9558
674 Develop [c++] 링크리스트(linked list) 클래스(스택,큐) file hooni 2003.04.23 9553
673 Develop [c] 파일(File)의 연결과 연결 해제 (link, unlink, chown) hooni 2013.04.23 9543
672 Develop [c] 팩토리얼.. - 재귀함수 hooni 2003.04.23 9500
671 Develop [java] 거스름돈 계산.. swing 사용 file hooni 2013.04.23 9442
670 Develop [java] 스윙(swing)버튼 테스트 ㅋㅋ file hooni 2013.04.23 9421
669 Develop [js] jQuery 셀랙터(selector) 요약 hooni 2013.12.17 9418
668 Etc [english] 영어공부 혼자 하기, 인터넷으로 영어공부하기 추천사이트 20선 file hooni 2013.11.25 9408
667 Develop [c] 공용체를 이용해 MSB를 LSB로 변환 file hooni 2013.04.23 9374
666 Develop [c] 다중연결 서버 만들기 #2 - select() 사용 file hooni 2013.04.23 9361
665 Develop [java] Sieve of Eratosthenes (에라토스테네스의 체) hooni 2013.04.23 9337
664 System/OS [linux] 초간단 Postfix, Covecot, SSL/TLS (SMTP) file hooni 2017.12.11 9323
663 Develop [c++] MFC로 만든 디렉토리/파일 파인더 file hooni 2013.04.23 9323
662 Develop [c++] 더블 링크리스트(linked list) 학습용 초간단 단어장 file hooni 2003.04.23 9323
Board Pagination Prev 1 ... 30 31 32 33 34 ... 74 Next
/ 74