0

I've implemented iCarousel and the following delegate.

- (void)carouselCurrentItemIndexDidChange:(iCarousel *)carousel

This delegate calls properly when I scroll, but doesn't get call when I first load the carousel at index 0. This is because by default Icarosuel default index is 0.

The only work around I have is calling the delegate method when the index is 0 like so.

  if (index == 0) {
        [self carouselCurrentItemIndexDidChange:self.carousel];
    }

I need the delegate method called because this is where I change quite a few things that isn't part of the carousel view. So I can use any of the data sources at all.

Weakman10122
  • 371
  • 2
  • 14

1 Answers1

0
@IBOutlet weak var objCarosel: iCarousel!

override func viewDidLoad()
{    
   super.viewDidLoad()
   //Set delegate and datasource help to call predefine methods.   
   objCarosel.delegate = self      
   objCarosel.dataSource = self    
   objCarosel.reloadData()    
}
Agent Smith
  • 2,873
  • 17
  • 32
Vivek Gajbe
  • 411
  • 2
  • 14