alert 구현
- (IBAction)alert:(id)sender {
//팝업구현을 하는 클래스
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"알림" message:@"환영합니다." preferredStyle:UIAlertControllerStyleAlert];
//팝업 버튼 구현하는 클래스
UIAlertAction *closeAction = [UIAlertAction actionWithTitle:@"닫기" style:UIAlertActionStyleCancel handler:nil];
//팝업 클래스에 버튼을 넣는 메소드 호출
[alert addAction:closeAction];
//나타나게
[self presentViewController:alert animated:YES completion:nil];
}
'iOS 정리 > objective-c' 카테고리의 다른 글
| iOS 파일 시스템 관련 함수들 (NSFileManager Class) (3) | 2018.10.23 |
|---|---|
| objective c 의 모든것 (5) | 2018.07.28 |
| 객체지향 예제 (0) | 2018.07.10 |
| array dictionary (1) | 2018.07.10 |
| NSString 예제 (0) | 2018.07.09 |