ios how to plug in iCarousel selected by default an album, the default is to choose the first one, a third example, I want all the default options, how to set default values
This is the, iCarousel address https://github.com/nicklockwood/iCarousel
Reply:
Our idea is this: When iCarousel control is initialized, we put the second image in the default display in the middle, so, when the control initialization calls - (CGFloat) carouselItemWidth: (iCarousel *) carousel this approach, So we can be set in the method.
Code is as follows:
- (CGFloat) carouselItemWidth: (iCarousel *) carousel
{
/ / Initialize the time to set the default picture displayed in the middle of the second picture (index of 1)
[Carousel scrollToItemAtIndex: 1 animated: NO];
return ITEM_SPACING;
}
This method is not very professional feel and look forward to a more professional answer!
No comments:
Post a Comment