Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Customize the Load Method

Open the file that implements the CIPlugInRegistration protocol. In it you’ll find a load method, as shown in Listing 4-1. You have the option to add code to this method to perform any initialization that’s needed, such as a registration check. The method returns true if the filter is loaded successfully. If you don’t need any custom initialization, you can leave the load method as it is.

Listing 4-1  The load method provided by the image unit template

-(BOOL)load:(void*)host
{
    // custom image unit initialization code goes here
    return YES;
}

If you want, you can write an unload method to perform any cleanup tasks that might be required by your filter.



< Previous PageNext Page > Hide TOC


Last updated: 2008-06-09




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice