Contents

조회 수 46104 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
265 Develop [c] 프로세스간의 통신(파이프) hooni 2003.04.23 6891
264 Develop [c] 간단한 순위 루틴.. (정보처리기사) hooni 2003.04.23 6874
263 Develop [c] 라인수 입력받아 마름모꼴 출력하기.. hooni 2003.04.23 6868
262 Develop [js] 사라지는 브라우저 hooni 2003.04.23 6857
261 Develop [ajax] 샘플 코드와 한글처리에 대한 간단한 설명 hooni 2013.04.23 6842
260 Develop [pdf] 윈도우즈 95 시스템 프로그래밍(Windows 95 system programming) file hooni 2013.04.23 6842
259 Develop [js] get방식, url이후 모두 그대로 읽어오기.. hooni 2013.04.23 6841
258 Develop [js] 수명체크 프로그램 ㅋㅋ file hooni 2013.04.23 6838
257 Develop [c] 문자열 str_shift 예제.. file hooni 2013.04.23 6835
256 Develop [c++] 프리렉(freelec) 예제 자료.. ㅋㄷ file hooni 2013.04.23 6829
255 Develop [c] 웹 메모장.. ㅋㅋ file hooni 2013.04.23 6823
254 Develop [c] 단기과정[01/14] 파일 입출력 file hooni 2003.04.23 6821
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 ... 71 Next
/ 71