0

I binded the content of an IKImageBrowserView to an array controller of objects Person implementing the IKImageBrowserItem protocol:

– imageUID
– imageRepresentationType
– imageRepresentation

In the class Person, I want the attribute "photo" to be the same as the attribute "imageRepresentation" (that was added merely to conform to the protocol).

My solution so far is to bind the 2 attributes in the Person init method. However, I don't like to have duplicated attributes, since Person is a model class.

What should I do ? (keeping in mind that I want to preserve the name photo, and not imageRepresentation)

dewphy
  • 21
  • 3

1 Answers1

1

Since imageRepresentation is mandatory for the protocol, but you want to use the photo property, you could implement the method in this way:

- (id)imageRepresentation {
    return self.photo
}  

In this way you fulfill the protocol, but you are using only photo.

max.me
  • 105
  • 7