I want to have the index of the current selected Dictionary of an NSCollectionView.
I have this code but it always returns "0".
- (IBAction)selectItem:(id)sender {
NSInteger index = [[CollectionView subviews] indexOfObject:self.representedObject];
NSLog(@"%ld", (long)index);
}
I don't know what I am doing wrong.