Closed angeloh closed 12 years ago
If I have no image locally, and want to load image from Url. What can I do to assign the image in cell mapping's block?
[BKDynamicCellMapping mappingForObjectClass:[Item class] block:^(BKDynamicCellMapping *cellMapping) { [cellMapping mapKeyPath:@"imageUrl" toAttribute:@"imageView.image" valueBlock:^id(NSString *url) { // how to load image async here and assign to uiimage view }]; }];
First set the url [cellMapping mapKeyPath:@"imageURL" toAttribute:@"imageURL"];
After that, the mapper will call this method inside you cell view:
- (void)setImageURL:(NSString *)imageURL { }
If I have no image locally, and want to load image from Url. What can I do to assign the image in cell mapping's block?