假设我有一个整数 (hi),即 0。我希望通知在消息中显示 0。我的代码是:
-(IBAction) alert3;
{
int hi = 0;
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"UIAlertView"
message:@"%d"
delegate:hi
cancelButtonTitle:@"Ok"
otherButtonTitles: nil];
然后我得到一个错误:
“不兼容的整数到指针转换将'int'发送到'id'类型的参数”