NSArray *quotes = @[
@"R u done yet",
@"Log in again",
// ...
"Please just connect to the servers", // 缺少 @
@"You are not giving up are u",
// ...
];
第 7 個元素 "Please just connect to the servers" 缺少 @ 前綴,屬於 C 風格字串常量 const char*,而非 NSString*。放入 NSArray 時類型不匹配,後續 objectAtIndex: 取出並當作 NSString 發送訊息導致崩潰。
@"Please just connect to the servers", // 加上 @
["str1", "str2"] 類型安全,編譯期直接報錯。