Getting Properties

EOSCamera is a subclass of EOSPropertyObject, and therefore inherits methods that can be used to access properties of a camera. All of the properties that can be accessed are defined by the EOSProperty enumeration. For example, the camera's serial number can be retrieved as a string by using the following method:

Many property values are retrieved as numeric codes that are defined by property enumerations. For example, when retrieving the aperture, you will get an EOSAperture value such as EOSAperture_5_6, rather than a double value such as 5.6. To compare values, you will need to get the unsigned integer value:

You may want to use dictionaries to translate the codes into understandable values. Fortunately, EOSFramework comes with a set of such dictionaries. They can be found in the defaultDictionary object of the EOSDictionary class. The EOSDictionary class is not compiled into the framework - you will need to import the EOSDictionary.h and EOSDictionary.m files separately.

Setting Properties

Properties can be set by using a similar set of methods:

//set the artist's name, which is included in copyright metadata
[camera setStringValue:@"Bob" forProperty:EOSProperty_Artist error:nil];
//set the white balance and check for failure
if (![camera setNumberValue:EOSWhiteBalance_Auto forProperty:EOSWhiteBalance]){
NSLog(@"Could not set white balance");
}

Getting Supported Values

For some properties, a list of values that are supported by the camera in its current mode can be retrieved. Each value in the list is represented by an NSNumber. The following shows an example of how to print a list of the supported shutter speed values, in readable form.