也许我忽略了一些东西,可能在编码好几个小时之后很累,但这对我来说这个错误发生的原因很奇怪?
我只想展示图片,以表明它真的在抱怨这个。但这是代码:
- (void)alertView : (UIAlertView *)alertView1 clickedButtonAtIndex : (NSInteger)buttonIndex
{
if(alertView1 == alertWithOKButton)
{
if(buttonIndex == 0)
{
NSLog(@"ok button was pressed\n");
}
}
else if(alertView1 == alertWithYESNOButtons)
{
if(buttonIndex == 1)
{
NSLog(@"yesno button was pressed\n");
[self placeFinalOrder];
}
}
else if(alertView1 == alertWithCloseButton)
{
if(buttonIndex == 0)
{
[self popViewController];
}
}
}