功能效果
代码
- (void) showAlertMessage:(NSString *) myMessage{
//创建提示框指针
UIAlertController *alertMessage;
//用参数myMessage初始化提示框
alertMessage = [UIAlertController alertControllerWithTitle:@"Sharing" message:myMessage preferredStyle:UIAlertControllerStyleAlert];
//添加按钮
[alertMessage addAction:[UIAlertAction actionWithTitle:@"comfirm" style:UIAlertActionStyleDefault handler:nil]];
//display the message on screen 显示在屏幕上
[self presentViewController:alertMessage animated:YES completion:nil];
}