2013/5/3記錄:函數
類型名稱
|
描述
|
相容
|
va_list
|
用來保存宏va_arg與宏va_end所需信息
|
C89
|
巨集名稱
|
描述
|
相容
|
va_start
|
使va_list指向起始的參數
|
C89
|
va_arg
|
檢索參數
|
C89
|
va_end
|
釋放va_list
|
C89
|
va_copy
|
拷貝va_list的內容
|
C99
|
- (void)showAlert:(id)sender Title:(NSString*)title Message:(NSString*)message cancelButton:(NSString*)cancelbutton otherButton:(NSString*)otherbutton,... { UIAlertView*alert = [[UIAlertViewalloc] initWithTitle:title message:message delegate:sender cancelButtonTitle:cancelbutton otherButtonTitles:otherbutton,nil]; id eachObject; va_list argumentList; if (otherbutton) { va_start(argumentList, otherbutton); while ((eachObject = va_arg(argumentList, id))) { NSString *str = [NSStringstringWithFormat:@"%@",eachObject]; [alert addButtonWithTitle:str]; } va_end(argumentList); } [alert show]; [alert release]; }