在iphone应用程序开发中的Alertview

时间:2010-12-17 10:09:04

标签: objective-c ios

我是iphone应用程序的新手。在我当前的应用程序中,我有uibutton(changepassword)。我的要求是,当我点击按钮时,它会显示alertview,其中包含三个textfileds(当前密码,newpassword,retype password) )和两个uibuttons(提交按钮,取消按钮)。任何人都可以向我发送所需的代码并附上解释吗?

1 个答案:

答案 0 :(得分:3)

// Create a new alert object and set initial values.
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title"
                                                message:@"Message"
                                               delegate:nil
                                      cancelButtonTitle:@"Ok"
                                      otherButtonTitles:nil];
// Display the alert to the user
[alert show];
// Release the alert
[alert release];

此处的示例和说明:http://iloveco.de/uikit-alert-types/

参考:http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html