//[NSBundle mainBundle]用来获取应用程序包
//pathForResource 用来获取包内资源的路径
NSString *imagePath = [NSBundle mainBundle]pathForResource:(NSString *) ofType:(NSString *);
self.photoImage.image = [UIImage imageWithContentsOfFile:(NSString *)];
NSString *imagePath = [[NSBundlemainBundle]pathForResource:stu.imageName ofType:nil];
self.photoImage.image = [UIImageimageWithContentsOfFile:imagePath];
//获取指定路径下的几张图片
for(int i =0;i<5;i++)
{
UIImageView *imageView = [UIImageView alloc]initWithFrame:CGRectMake(320*4,0,320,480)];
//imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"%d.jpg",i+1]];
NSString *imagePath = [NSBundle mainBundle]pathForResourse:[NSString stringWithFormat:@"%d.jpg",i+1] ofType:nil];
imageView.image = [UIImage alloc ]initWithContentOfFile:imagePath];
[imageView release];
}