2008-12-06 18 views

回答

13

您可以使用這樣的事情:

void AlertWithMessage(NSString *message) 
{ 
/* open an alert with an OK button */ 
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Name of the Application" 
           message:message 
           delegate:nil 
           cancelButtonTitle:@"OK" 
           otherButtonTitles: nil]; 
[alert show]; 
[alert release]; 
} 
+1

正如你已經想出了弧,[警報釋放]必須被刪除。 – 2012-10-12 08:12:08

1

我只是使用UIAlertView來顯示模態警報。你在尋找哪些附加功能?

1

退房從蘋果的UICatalog示例代碼。它顯示了手機上的警報和表單的使用情況。