0
看起来像一个惊人的微不足道的差异。将otherButtonTitles
的非nil
值传递给UIAlerView
会爆炸。iOS/Cocoa:UIAlertView投掷EXC_BAD_ACCESS
工作:
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Login with your credentials"
message:nil
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:nil];
不工作:
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle:@"Login with your credentials"
message:nil
delegate:nil
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK"];
是怎么回事?