ios 뽀개기/objective-c
단순 팝업 메시지
인생여희
2019. 10. 24. 13:18
반응형
//단순 메시지 전달해서 팝업 띄우기 메소드
- (void)popUpWithMessage:(NSString *)message {
UIAlertController * alert= [UIAlertController
alertControllerWithTitle:@"알림"
message:message
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* ok = [UIAlertAction
actionWithTitle:@"OK"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action)
{
[alert dismissViewControllerAnimated:YES completion:nil];
}];
[alert addAction:ok];
[self presentViewController:alert animated:YES completion:nil];
}
반응형