どちらの呼び出しが正しいですか?両方の呼び出しに同じ結果があると思われます。iOS:UIImageの初期化
UIImage *img = [UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
または
UIImage *img = [[UIImage alloc] imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"image" ofType:@"png"]];
+1私は2番目のことを間違えました(これは賢明ではありません) – MByD