ultragtx / GSBookShelf

An iBooks-styled book shelf for iOS (Animation of drag & drop, insert, remove...)
Other
426 stars 90 forks source link

How to get the BookView instance just after add one book? #7

Closed Yincan closed 11 years ago

Yincan commented 11 years ago

When call - (void)insertBookViewsAtIndexs:(NSIndexSet *)indexs animate:(BOOL)animate; to insert new BookViews, I want to the BookView instance to operation on.

For example, user choose to download a book, the method will be called with parameter [NSMutableIndexSet indexSetWithIndex:0]. Then I want the BookView added to the 0 to operation on, for example, to display the download progress with it.

Now I can not find a simple way to get the correct BookView instance (in case if there is no book, and just download the first one). Hope there will be supporting for this. Like add method: - (void)insertBookViewAnimation:(BOOL)animate callback:(void(^)(UIView *bookView))callback

ultragtx commented 11 years ago

@Yincan I think you should do it in the delegate method - (UIView *)bookShelfView:(GSBookShelfView *)bookShelfView bookViewAtIndex:(NSInteger)index;