Contents

조회 수 46100 댓글 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 [linux] 쉘 스크립트를 이용한 BBS hooni 2003.04.23 10047
264 Develop [c] 분수계산 함수^^ hooni 2003.04.23 10055
263 Develop [c] 간단한 자료구조(stack, queue, linked list) 구현 소스 6 file hooni 2003.04.23 10098
262 Develop [c++] p.47 연습문제 3번 hooni 2003.04.23 10105
261 Develop [c] 최단거리 알고리즘 & 예제소스.. 13 file hooni 2013.04.23 10171
260 Develop [c] 그래픽스 자료(OpenGL 라이브러리) 샘플 소스 file hooni 2003.04.23 10181
259 Develop [c] pcap을 이용한 패킷 분석 ㅎㅎ hooni 2003.04.23 10210
258 Develop [c++] Window API(MFC) 오목 게임 file hooni 2003.04.23 10275
257 Develop [java] 입출력 스트림 2부 (바이트) file hooni 2013.04.23 10291
256 Develop [c] OpenGL 임시로 여기 올림.. hooni 2003.04.23 10324
255 Develop 최근 논문 자료 (2011/01/03, 만현형한테 보낸거..) secret hooni 2013.04.23 10366
254 Develop [php] 날짜 정보 출력 (년,월,일,시,분,초) hooni 2013.04.23 10487
Board Pagination Prev 1 ... 44 45 46 47 48 49 50 51 52 53 ... 71 Next
/ 71