PDA

View Full Version : Setting IKImageBrowserView's DataSource




Blakeasd
May 15, 2011, 08:33 PM
Hello,
How do I set the source of an IKImageBrowserView?
1. Can it be an NSMutableArray full of images?
2. If I use an NSMutableArray can I use IKImageBrowserView's setDataSource:
method?
Thanks



jiminaus
May 15, 2011, 09:19 PM
This answer to this is in your own Populating NSMutableArray thread.

chown33
May 15, 2011, 09:25 PM
Hello,
How do I set the source of an IKImageBrowserView?

With the setDataSource: method.

1. Can it be an NSMutableArray full of images?

According to the documentation for setDataSource:, the object set as the data-source must implement the required parts of the IKImageBrowserDataSource protocol.

Does NSMutableArray implement the required parts of that protocol? No, it doesn't.

2. If I use an NSMutableArray can I use IKImageBrowserView's setDataSource:
method?

NSMutableArray doesn't implement the required parts of the IKImageBrowserDataSource protocol.