Closed enefry closed 1 year ago
- (void)configurePage:(IDMZoomingScrollView *)page forIndex:(NSUInteger)index { page.frame = [self frameForPageAtIndex:index]; page.tag = PAGE_INDEX_TAG_OFFSET + index; page.photo = [self photoAtIndex:index]; __block __weak IDMPhoto *photo = (IDMPhoto*)page.photo; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! __weak IDMZoomingScrollView* weakPage = page; photo.progressUpdateBlock = ^(CGFloat progress){ [weakPage setProgress:progress forPhoto:photo]; }; }
Why not declare in IDMPhoto protocol instead force convert ?