戴远的IT博客 首页 阅读

开发点滴记录

如何从git中删除某个文件?

有一个文件Project.xcworkspace/xcuserdata/.xcuserdatad/UserInterfaceState.xcuserstate,每次更新代码后被修改掉。 用下面的代码移除它:

git rm --cached Project.xcworkspace/xcuserdata/<xxxxx>.xcuserdatad/UserInterfaceState.xcuserstat
git commit -m 'removed dont managed file'

用imageName还是imageWithContentsOfFile创建图片##

The docs say: “If you have an image file that will only be displayed once and wish to ensure that it does not get added to the system’s cache, you should instead create your image using imageWithContentsOfFile:. This will keep your single-use image out of the system image cache, potentially improving the memory use characteristics of your app.” So, if your images are not re-used, you should use imageWithContentsOfFile: instead of imageNamed:.

--EOF--
若无特别说明,本站文章均为原创,转载请保留[链接]