似乎是一个令人震惊的微不足道的差异。传递一个非nil
值 for otherButtonTitles
to 会UIAlerView
爆炸。
在职的:
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"];
是什么赋予了?