noobobjective-cの質問があります。UIImageをMSMutableArrayにどのように追加しますか?これが私が持っているコードです:
MSMutableArray *arr = [[NSMutableArray alloc] init];
UIImage *image;
UIGraphicsBeginImageContext(contextSize);
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextTranslateCTM(context, 0, pushUpSize);
[screenWindow.layer renderInContext: context];
image = UIGraphicsGetImageFromCurrentImageContext();
}
UIGraphicsEndImageContext();
[arr addObject:image];
しかし、これは画像を追加しようとするとプログラムをクラッシュさせます。ポインタではなく変数を追加することをどこかで読んだのですが、それは正しいですか?UIImageを配列に追加するにはどうすればよいですか?そのオブジェクトではありませんか?
ありがとう!