這是什麼錯誤?我使用可變類型,但它仍然不工作!嘗試變更不可變對象的錯誤
錯誤是:
終止應用程序由於未捕獲的異常 'NSInvalidArgumentException' 的,理由是: '改變一個不可改變的 對象與deleteCharactersInRange:'
NSMutableString *line= [NSMutableString stringWithString:@"here is the string"];
[line deleteCharactersInRange: NSMakeRange(1,9)];
代碼已修改!在這種情況下檢查PLZ。 –
您的修改代碼適用於我。它還不適合你嗎? –