有沒有人有任何最佳實踐,提示&技巧,或建議如何使用Cocoa Touch創建模態警報視圖?使用Cocoa Touch實現模態警報視圖的最佳實踐?
我喜歡認爲有一種方法可以使這項艱鉅的任務變得微不足道或至少更容易。
有沒有人有任何最佳實踐,提示&技巧,或建議如何使用Cocoa Touch創建模態警報視圖?使用Cocoa Touch實現模態警報視圖的最佳實踐?
我喜歡認爲有一種方法可以使這項艱鉅的任務變得微不足道或至少更容易。
您可以使用這樣的事情:
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];
}
我只是使用UIAlertView來顯示模態警報。你在尋找哪些附加功能?
退房從蘋果的UICatalog示例代碼。它顯示了手機上的警報和表單的使用情況。
正如你已經想出了弧,[警報釋放]必須被刪除。 – 2012-10-12 08:12:08