Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma mark - UITableViewDatasource Methods
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
- UITableViewCell *cell;
- NSObject <CreatorProtocol> *creator = self.cellCreators[indexPath.row];
- NSString *cellId = [creator reuseIdentifier];
- cell = [tableView dequeueReusableCellWithIdentifier:cellId];
- if (cell == nil) {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellId];
- }
- [(NSObject <PSCellProtocol> *)cell setupCellWithCreator:creator];
- return cell;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return [self.cellCreators count];
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return [(NSObject <CreatorProtocol> *)self.cellCreators[indexPath.row] height];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement