조회 수 55967 추천 수 0 댓글 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
번호 분류 제목 글쓴이 날짜 조회 수
43 Develop 정리할 자료. file hooni 2015.07.02 2092
42 Develop [c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전 secret hooni 2013.04.23 2090
41 Develop [maven] Mac OS에 메이븐(maven) 설치하기 file hooni 2015.01.21 2090
40 Develop [linux] CentOS Apache 웹서버에 HTTPS 적용 hooni 2015.10.23 2085
39 Develop [c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스 secret hooni 2013.04.23 2073
38 Develop [ios] Thread Loop 내에서 UI 업데이트 방법 hooni 2015.01.03 2072
37 Develop [js] 스크롤 이벤트 막기 hooni 2015.04.14 2070
36 Develop GPL, AGPL, MPL,.. 한눈에 보는 오픈소스SW 라이선스 file hooni 2014.10.14 2062
35 Develop [android] AlertDialog 메시지 창 띄우기 hooni 2015.07.09 2053
34 Develop [c] 이진 탐색 두 가지 코드 (재귀/반복) file hooni 2015.06.26 2026
33 Develop [ios] NSData to NSString (NSString to NSData) hooni 2015.07.21 2024
32 Develop [ios] SBCampanion App 초안 file hooni 2015.09.16 2008
31 Develop [ios] UIWebView에서 로컬에 있는 html 파일 불러오기 hooni 2015.02.10 1999
30 Develop [ios] 새로 만들고 있는 DateMemo file hooni 2016.07.12 1897
29 Develop [ios] NSNotificationCenter 초간단 사용 예~ ㅋㄷ hooni 2015.06.26 1854
28 Develop [ios] 문자열로 함수 실행하기 (eval 함수처럼) hooni 2015.02.10 1834
Board Pagination Prev 1 ... 49 50 51 52 53 Next
/ 53