我從JSON
文件中引入一些數據,我想將字體更改爲courier
,但是當我嘗試執行以下操作時,出現此錯誤:"Property 'font' not found on object NSString"
。有沒有辦法解決?更改字體與目標C中的對象的字符串C
NSString *timePeriod = [diction objectForKey:@"Time Period"];
UIFont *changeFont = [UIFont fontWithName:@"Courier" size:12];
timePeriod.font = changeFont;
您可以嘗試NSAttributedString –
對不起同樣的錯誤 – user1832095