Views 46115 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 [js] Closure를 이용해 캡슐화.. hooni 2013.12.16 9596
676 Develop [js] Click button copy to clipboard hooni 2018.04.05 1179
675 Develop [js] Array.splice() 설명 hooni 2014.04.24 3007
674 Develop [js] AngularJS를 소개합니다. file hooni 2014.01.06 13017
673 Develop [js] AngularJS 란? file hooni 2015.11.26 895
672 Develop [js] ajax를 이용해 외부문서 불러오기.. hooni 2013.04.23 6799
671 Develop [js] 2차 잉여.. (Quadratic reciprocity) 계산.. file hooni 2013.04.23 7077
670 Develop [js] 2048 예쁘게 만들고 있는거.. ㅋㄷ secret hooni 2015.01.30 0
669 Develop [jsp][php] 간단한 강좌 자료.. file hooni 2003.04.23 8109
668 Develop [jsp][php] LDAP 프로그래밍.. file hooni 2003.04.23 7386
667 Develop [jsp] 페이지에 한글이 정상적으로 보이지 않을 때.. hooni 2013.04.23 8161
666 Develop [jsp] 초간단한 include 구문 예제.. file hooni 2013.04.23 7227
665 Develop [jsp] 정적/동적(차트생성) 이미지 전달 file hooni 2003.04.23 7307
664 Develop [jsp] 유효성체크(Client, Server 에서) file hooni 2003.04.23 7425
663 Develop [jsp] RSS(xml) 파싱해서 보여주기 ㅎㅎ file hooni 2013.04.23 13215
662 Develop [jsp] HelloServlet 출력문 file hooni 2003.04.23 7796
Board Pagination Prev 1 ... 30 31 32 33 34 ... 74 Next
/ 74