Created
April 28, 2013 14:26
-
-
Save jontelang/5477026 to your computer and use it in GitHub Desktop.
ddd
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
#include "Preferences/Preferences.h" | |
@interface PSTableCell () | |
- (id)initWithSpecifier:(PSSpecifier *)specifier; | |
- (id)initWithStyle:(UITableViewCellStyle)x reuseIdentifier:(id)y specifier:(id)z; | |
@end | |
@interface CustomCell : PSTableCell {//<PreferencesTableCustomView> { | |
UILabel *_label; | |
} | |
@end | |
@implementation CustomCell | |
- (id)initWithSpecifier:(PSSpecifier *)specifier | |
{ | |
self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"Cell" specifier:specifier]; | |
if (self) { | |
CGRect frame = [self frame]; | |
_label = [[UILabel alloc] initWithFrame:frame]; | |
[_label setLineBreakMode:UILineBreakModeWordWrap]; | |
[_label setNumberOfLines:0]; | |
[_label setText:@"You can use attributed text to make this prettier."]; | |
[_label setBackgroundColor:[UIColor clearColor]]; | |
[_label setShadowColor:[UIColor whiteColor]]; | |
[_label setShadowOffset:CGSizeMake(0,1)]; | |
[_label setTextAlignment:UITextAlignmentCenter]; | |
[self addSubview:_label]; | |
[_label release]; | |
} | |
return self; | |
} | |
- (float)preferredHeightForWidth:(float)arg1 | |
{ | |
// Return a custom cell height. | |
return 60.f; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment