7
如何以编程方式取消UIAlertView
? 这是我用来显示UIAlertView中以编程方式取消UIAlertView
UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:@"Save Background" message:@"Downloading..." delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:nil, nil];
CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 70.0);
[myAlertView setTransform:myTransform];
[myAlertView show];
+1对你来说,比我输入时快20秒[['''cancelButtonIndex'“](https://developer.apple.com/library/ios/documentation/UIKit/Reference/不过,UIAlertView_Class/UIAlertView/UIAlertView.html#// apple_ref/occ/instp/UIAlertView/cancelButtonIndex)并不总是“-1”。 – 2012-08-09 16:26:22