Guest User

Untitled

a guest
May 21st, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  2. {
  3. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  4. if (self) {
  5. // Initialization code
  6. label = [[UILabel alloc] initWithFrame:self.bounds];
  7. label.backgroundColor = [UIColor yellowColor];
  8. label.text = @"test";
  9. [self.contentView addSubview:label];
  10. [label release];
  11. }
  12. return self;
  13. }
  14.  
  15.  
  16. - (void)dealloc {
  17.  
  18. [super dealloc];
  19. [label release];
  20.  
  21. }
  22.  
  23. - (void)layoutSubviews
  24. {
  25. [super layoutSubviews];
  26. label.frame = self.bounds;
  27. }
  28.  
  29. @end
Add Comment
Please, Sign In to add comment