FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

robert1202/UITableView-FDTemplateLayoutCell: Template auto layout cell for automatically UITableViewCell height calculating · GitHub

 
 

Repository files navigation

UITableView-FDTemplateLayoutCell

Overview

Template auto layout cell for automatically UITableViewCell height calculating.

Usage

If you have a self-satisfied cell, then all you have to do is:

#import "UITableView+FDTemplateLayoutCell.h"

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return [tableView fd_heightForCellWithIdentifier:@"reuse identifer" configuration:^(id cell) {
        // Configure this cell with data, same as what you've done in "-tableView:cellForRowAtIndexPath:"
        // Like:
        //    cell.entity = self.feedEntities[indexPath.row];
    }];
}

About self-satisfied cell

a fully self-satisfied cell is constrainted by auto layout and each edge("top", "left", "bottom", "right") has at least one layout constraint against it.

A bad one :( - missing right and bottom

A good one :)

Installation

pod search UITableView+FDTemplateLayoutCell 

License

MIT

About

Template auto layout cell for automatically UITableViewCell height calculating

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages


Back | FazBrowse Home | New Git URL