代码很简单

 

  1. NSString * path = [[NSBundle mainBundle] pathForResource:@"resource" ofType:@"plist"]; 
  2. self.resource = [[[NSDictionary alloc] initWithContentsOfFile:path] autorelease]; 

这样应该是没有错误的,我们可以看出来path是没有问题的(debug中),就是第二句返回nil

把这个plist从工程移除,再添加进去,就好了!!为什么呢,tell me why!!