zepojo/UPCardsCarousel

Label as delegate

xiaoxu193 opened this issue · 1 comments

Instead of setting the label text inside the UPCardsCarousel, it seems better to just create a delegate function (maybe updateLabelForIndex:(NSInteger)index), and have the delegate class decide what to do with the label.

Thoughts?

Are you talking about the label text (the content) or the label itself (the UILabel object)?
The label text is already supplied by the dataSource method

- (NSString *)carousel:(UPCardsCarousel *)carousel labelForCardAtIndex:(NSUInteger)index;

What you would want to do is customize the UILabel object? (and maybe differently according to the current index?). If not, do you have an example of what you are thinking of?
Let me know if I misunderstood something.