Sha256: f930c76cf7f72dbb32691e90e2c3e045fefeabf866da8f6c82bbc83f5b3dd3b1
Contents?: true
Size: 1.45 KB
Versions: 3
Compression:
Stored size: 1.45 KB
Contents
// // UIBubbleHeaderTableViewCell.m // UIBubbleTableViewExample // // Created by Александр Баринов on 10/7/12. // Copyright (c) 2012 Stex Group. All rights reserved. // #import "UIBubbleHeaderTableViewCell.h" @interface UIBubbleHeaderTableViewCell () @property (nonatomic, retain) UILabel *label; @end @implementation UIBubbleHeaderTableViewCell @synthesize label = _label; @synthesize date = _date; + (CGFloat)height { return 28.0; } - (void)setDate:(NSDate *)value { NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; [dateFormatter setDateStyle:NSDateFormatterMediumStyle]; [dateFormatter setTimeStyle:NSDateFormatterShortStyle]; NSString *text = [dateFormatter stringFromDate:value]; #if !__has_feature(objc_arc) [dateFormatter release]; #endif if (self.label) { self.label.text = text; return; } self.selectionStyle = UITableViewCellSelectionStyleNone; self.label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, [UIBubbleHeaderTableViewCell height])]; self.label.text = text; self.label.font = [UIFont boldSystemFontOfSize:12]; self.label.textAlignment = NSTextAlignmentCenter; self.label.shadowOffset = CGSizeMake(0, 1); self.label.shadowColor = [UIColor whiteColor]; self.label.textColor = [UIColor darkGrayColor]; self.label.backgroundColor = [UIColor clearColor]; [self addSubview:self.label]; } @end
Version data entries
3 entries across 3 versions & 1 rubygems