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"];
是怎麼回事?