for (int i = 0; i<=numberOfImage; i++) { [[NSBundle mainBundle] resourcePath]; path=[[NSBundle mainBundle]pathForResource:[NSString stringWithFormat:@"%@_%d.jpg",nameOfAnimation,i] ofType:nil]; UIImage * p_w_picpath = [UIImage p_w_picpathWithContentsOfFile:path]; [p_w_picpathArray addObject:p_w_picpath]; }
使用上述方法加載圖片時,能偶節約內存!!!