0

当我尝试NSLog用这个来塑造我的形象时;

NSLog([images description]);

这出现:

2012-06-05 10:31:38.801 Project1[1180:1a303] (
    "<UIImage: 0x9a52bb0>",
    "<UIImage: 0x9c89460>",
    "<UIImage: 0x9c9c720>",
    "<UIImage: 0x8e4ee70>",
    "<UIImage: 0x8e805f0>"
)

我正在从 . 加载我的 UIImage 。NSDocumentDirectory有人可以解释一下这是什么。

4

1 回答 1

2

It looks like your images object is an NSArray (or similar array like object) of UIImages. When you NSLog the description of the images array it is listing the objects in the array and calling description on each of those objects. As it doesn't make sense to get a text description of an image it instead prints the object type, in this case 'UIImage', and the address of the object in memory, e.g. 0x9a52bb0.

I'm not sure what you mean by "And how to make this into NSInteger?' It doesn't make sense to convert an image into an integer.

于 2012-06-05T02:41:24.110 回答