0
我有大约20行文本,需要有一些值,当我使用createFileAtPath
创建文件模板?
[firstname] has a surname of [surname]
and is [gender]
etc etc etc
etc etc etc
etc etc etc
etc etc etc
and lives in [suburb]
我有当用户点击一个按钮
创建该文件的次数可以这样通过创建某种模板或恒定的做,我可以用我的变量替换占位符?同样的事情也给NSString stringWithFormat
称为像
[NSString stringWithFormat:myTemplate, person.firstname, person.surname, person.gender, person.suburb]