조회 수 46193 추천 수 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){
            
        }
    }
    
}

?

  1. [vb] 비주얼 베이직 173페이지

  2. [vb] 비쥬얼 베이직 기출 문제 연습2

  3. [vb] 비쥬얼 베이직으로..

  4. [ios] UIAlertView 초간단 샘플 ㅎㅎ

  5. [ios] 미스터피자(Mr.pizza) 어플

  6. [ios] iOS 4.0 beta 에서 3.1.3으로 다운그레이드 하는 법

  7. [lego] 세그웨이 이것만 볼것.. ㅎㅎ

  8. [android] 디바이스(시뮬레이터) hosts 파일 수정하기

  9. [js] 웹페이지에서 특정 엘리먼트 드래그, 복사, 컨텍스트메뉴, 키보드 막기

  10. [ios] 소소한 팁 (Rect,Point,Path,URL 등)

  11. [c#] 웹문서 소스(html) 긁어오기

  12. [vb] 문자열에서 태그 제거함수 (Visual Basic)

  13. [ios] UIView에서 상위 UIViewController 가져오기

  14. [java] 입출력 스트림 3부 (오브젝트)

  15. [android] 안드로이드 어플 모음 ㅎㅎ

  16. [java] 입출력 스트림 1부 (문자)

Board Pagination Prev 1 2 3 4 Next
/ 4