Mac Developer Library

Developer

Quartz Framework Reference CIFilter ImageKit Additions

Options
Deployment Target:

On This Page
Language:

CIFilter

This Image Kit addition to the CIFilter class, introduced in OS X v10.5, consists of one method and a set of constants that generate a view with input parameter controls for a Core Image filter. Using this method, it is easier for applications to present a user interface for a filter than it was in OS X v10.4. Then, applications could create a filter user interface only by analyzing the keys and key attributes of a filter and then writing the code to implement the user interface. More...

Inheritance


Not Applicable

Conforms To


Not Applicable

Import Statement


import Quartz @import Quartz;

Availability


Available in OS X v10.5 and later.
  • Returns a filter view for the filter.

    Declaration

    Swift

    func viewForUIConfiguration(_ inUIConfiguration: [NSObject : AnyObject]!, excludedKeys inKeys: [AnyObject]!) -> IKFilterUIView!

    Objective-C

    - (IKFilterUIView *)viewForUIConfiguration:(NSDictionary *)inUIConfiguration excludedKeys:(NSArray *)inKeys

    Parameters

    inUIConfiguration

    A dictionary that contains values for the IKUISizeFlavor and kCIUIParameterSet keys. See “User Interface Options” for the constants that you can provide as values for IKUISizeFlavor. For kCIUIParameterSet you can provide one of the following values: kCIUISetBasic, kCIUISetIntermediate, kCIUISetAdvanced, or kCIUISetDevelopment. When you request a user interface for a parameter set, all keys for that set and below are included. For example, the advanced set consists of all parameters in the basic, intermediate and advanced sets. The development set should contain parameters that are either experimental or for debugging purposes. You should use them only during the development of filters and client applications, and not in a shipping product.

    inKeys

    An array of the input keys for which you do not want to provide a user interface. Pass nil if you want all input keys to be represented in the user interface.

    Return Value

    An IKFilterUIView object.

    Discussion

    Calling this method to receive a view for a filter causes the CIFilter class to invoke the provideViewForUIConfiguration:excludedKeys: method. If you override provideViewForUIConfiguration:excludedKeys: the user interface is created by your filter subclass . Otherwise, Core Image automatically generates the user interface based on the filter keys and attributes.

    The algorithm used to lay out the controls for a filter operates in a manner similar to the Core Image Fun House application (/Developer/Applications/Graphics Tools/). Applications can retrieve a view whose control sizes complement the size of user interface elements already used in the application. It is also possible to choose which filter input parameters appear in the view. Consumer applications, for example, may want to show a small, basic set of input parameters whereas professional applications may want to provide access to all input parameters.

    The controls in the view use bindings to set the values of the filter. See Cocoa Bindings Programming Topics if you are unfamiliar with bindings.

    Import Statement

    import Quartz

    Availability

    Available in OS X v10.5 and later.

  • Keys or values for the size of the input parameter controls for a filter view.

    Declaration

    Swift

    var IKUISizeFlavor: NSString! var IKUISizeMini: NSString! var IKUISizeSmall: NSString! var IKUISizeRegular: NSString! var IKUImaxSize: NSString! var IKUIFlavorAllowFallback: NSString!

    Objective-C

    NSString *IKUISizeFlavor; NSString *IKUISizeMini; NSString *IKUISizeSmall; NSString *IKUISizeRegular; NSString *IKUImaxSize; NSString *IKUIFlavorAllowFallback;

    Constants

    • IKUISizeFlavor

      IKUISizeFlavor

      A key for the size of the controls in a filter view. The associated value can be IKUISizeMini, IKUISizeSmall, or IKUISizeRegular.

      Available in OS X v10.5 and later.

    • IKUISizeMini

      IKUISizeMini

      Controls whose size is mini, as defined by Interface Builder 2.5.

      Available in OS X v10.5 and later.

    • IKUISizeSmall

      IKUISizeSmall

      Controls whose size is small, as defined by Interface Builder 2.5.

      Available in OS X v10.5 and later.

    • IKUISizeRegular

      IKUISizeRegular

      Controls whose size is regular or normal, as defined by Interface Builder 2.5.

      Available in OS X v10.5 and later.

    • IKUImaxSize

      IKUImaxSize

      Controls whose dimensions are the maximum allowable for the filter view. A width or height of 0 indicates that that dimension of the view is not restricted. If the size requested is too small, the filter is expected to return a view as small as possible. It is up to the client to verify that the returned view fits into the context.

      Available in OS X v10.5 and later.

    • IKUIFlavorAllowFallback

      IKUIFlavorAllowFallback

      Substitute controls of another size. The associated value is a Boolean value. If the filter cannot provide a view for the requested size and a fallback is allowed, the filter can use controls of a different size.

      Available in OS X v10.5 and later.

    Import Statement