Sunday, January 04, 2009

Utility class for loading a UIImage without caching

I've checked in a utility class for UIImage, which adds a new category to load images without caching .  You use it as follows:

UIImage *image = [UIImage imageFromResource:@"my_image.png"];


You should only do this if there is a specific reason you do not want caching.

 

5 comments:

Anonymous said...

Are U dead Mr Never Release Anything?

darioco said...

Hi,

I know this is out off topic but I had to track you all the way here, I was looking at your assembly code for the iPhone and I find it pretty useful. My only question is that as far as i know apple wouldn't let you use assembly in your code if you want to publish your app in the app store.

Do you know something that i don't or if i use your code it would be a blind shot?

Any help to solve this mystery would be greatly appreciated.

Thanks.
darioco

Stuart said...

No worries.

There is nothing in the SDK that prevents using ARM assembly. Where did you read this?

ARM assembly is openly discussed on the Apple Developer Forums. Any time a topic arises, discussing private APIs or issues that violate the SDK are immediately removed by Apple staff. You can find many topics related to ARM assembly, including ones I've been involved with are still on the forums.

Stuart said...

Also, Apple actually fixed a couple of minor bugs with the gcc ARM assembler in the 2.2 release of the SDK, which is a seemingly good sign that it is okay.

darioco said...

Hello,

Thanks for the info, I heard it from word of mouth.

Since we are writing a "pure" 2D engine for the iphone (not too much open gl involved) we can take advantage of asm for a lot of pixel processing and well... you know the possibilities are endless for optimization.

Thanks for the info and all your efforts to help others.

darioco