我在我的.h文件中聲明的方法爲警告對buttonPressed方法
-(IBAction)buttonTapped:(id) sender;
和我在.m文件應用此方法
-(IBAction)buttonTapped:(id)sender
{
NSString* themessage=[NSString stringWithFormat:@"I'm %@ and feeling %@ about it",[activities objectAtIndex:[tweetPicker selectedRowInComponent:0]],
[feelings objectAtIndex:[tweetPicker selectedRowInComponent:1]]];
NSLog (themessage);
}
但在該行的NSLog(themessage );
它顯示我警告likd「格式的字符串不是字符串字面量(潛在不安全」
PLS建議我什麼我應該做的......
可能重複[發出帶有編號:格式字符串不是一個字符串文字(HTTP://計算器.com/questions/5428325/issue-with-code-format-string-is-a-string-literal) – highlycaffeinated