Last active
December 14, 2015 14:49
-
-
Save kharmabum/5103384 to your computer and use it in GitHub Desktop.
Generic custom UITableViewCell with Nib
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
| // | |
| // FTCustomUITableViewCellWithNib.m | |
| // Created by Juan-Carlos Foust on 06/03/2013. | |
| // | |
| #import "FTCustomUITableViewCellWithNib.h" | |
| static UIImage *_placeholderImage = nil; | |
| @interface FTGenericUITableViewCellWithNib () | |
| @property (strong, nonatomic) UIImage *placeHolderImage; | |
| @end | |
| @implementation FTCustomUITableViewCellWithNib | |
| //FileOwner in nib file not set. Class on UITableViewCell in nib file set to FTCustomUITableViewCellWithNib | |
| @dynamic placeHolderImage; | |
| - (UIImage *)placeholderImage | |
| { | |
| if (!_placeholderImage) { | |
| _placeholderImage = [UIImage imageNamed:@"<#image-name#>.png"]; | |
| } | |
| return _placeholderImage; | |
| } | |
| - (void)prepareForReuse | |
| { | |
| [super prepareForReuse]; | |
| } | |
| - (void)setup | |
| { | |
| } | |
| - (void)awakeFromNib | |
| { | |
| [super awakeFromNib]; | |
| [self setup]; | |
| } | |
| - (NSString *)reuseIdentifier | |
| { | |
| return NSStringFromClass([self class]); | |
| } | |
| + (CGFloat)heightForInfo:(NSDictionary *)info | |
| { | |
| CGFloat height = 0; | |
| //calculate height | |
| return height; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment