目前我使用以下代码来呈现UIAlertView:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Today's Entry Complete"
message:@"Press OK to submit your data!"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles: nil];
[alert show];
[alert release];
Run Code Online (Sandbox Code Playgroud)
如何获得它,以便当按下"确定"时,它会触发一个功能,比方说 -(void)submitData