摘要:
首先,先总结一下如何获取Documents目录,在ios开发中,我们经常需要检索Documents目录的完整路径以便读取和写入文件,我总结了以下两种方法:1、NSString*documentsDirectory =[NSHomeDirectory() stringByAppendingPathComponent:@"Documents"];2、NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *document 阅读全文
posted @ 2013-05-02 09:28
aparche
阅读(1217)
评论(0)
推荐(0)
摘要:
enum Colors {Red(1), Yellow(2), Blue(3);private int _value; private Colors(int value) { _value = value; } public int value() { return _value; }}public class TestEnum {public static void main(String[] args) {int result = Colors.Blue.value();//获取枚举元素对应的值,即()里面的值System.out.println(result);Colors colo.. 阅读全文
posted @ 2013-05-02 09:09
aparche
阅读(231)
评论(0)
推荐(0)
浙公网安备 33010602011771号