Reputation: 4594
I'm pulling in a UIImage from an NSURL (as data) and I need to set the frame based on the size of the image. However, the image.size.width always comes back as 0, and image.size.height comes back as a large number (my guess is the total number of bytes in the image). Is there any way to get the proper values after an image has been downloaded?
Upvotes: 0
Views: 170
Reputation: 15625
Sounds like you're printing the width and height as integers. They're CGFloats.
Or, do this to print the size:
NSLog(@"%@", NSStringFromCGSize(theImage.size));
Upvotes: 3