Views 46203 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){
            
        }
    }
    
}

?

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

  2. [ios] Requesting Location Permissions in iOS

  3. [ios] Random Thoughts: Rand() vs. arc4random()

  4. [ios] NSString, RegularExpression Find/Replace

  5. [ios] NavigationController 에서 왼쪽(back) 버튼 후킹하기

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

  7. [ios] FlckrFeed Example App (Swift)

  8. [ios] Facebook SDK 로그인 설명

  9. [ios] Facebook Cache 갱신하는 함수

  10. [ios] Did UIScrollView End Scrolling?

  11. [c] 프로세스 검사하기

  12. [c] 메시지큐(Message Queue) 설명.. (joinc)

  13. [c] Mac OS 에 gmp(gmp.h) 라이브러리 설치

  14. [c] 64bit 머신에서 inet_ntoa() 사용시 Segment fault 대처 방법법

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

  16. [C#] MD5, SHA1 해시 & 인코딩

Board Pagination Prev 1 2 3 4 Next
/ 4