-
-
Save vinhnx/69b1a316b4c1af37f729 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
UITableViewCell *cell = | |
[tableView dequeueReusableCellWithIdentifier:REUSABLE_CELL_ID]; | |
UILabel *label = (UILabel *)[cell viewWithTag:VIEW_TAG]; | |
Model *someModel = [self getModelFromIndexPath:indexPath]; | |
// `takeUntil:` makes the RACObserve() signal complete (and thus breaks the subscription) | |
// when the cell is recycled. | |
RAC(label, text) = [RACObserve(someModel, someKey) | |
takeUntil:cell.rac_prepareForReuseSignal]; | |
return cell; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment