Skip to content

Instantly share code, notes, and snippets.

@sbrocket
Created February 1, 2009 01:24
Show Gist options
  • Select an option

  • Save sbrocket/55740 to your computer and use it in GitHub Desktop.

Select an option

Save sbrocket/55740 to your computer and use it in GitHub Desktop.
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier])) {
backgroundImageView = [[UIImageView alloc] initWithImage:nil];
backgroundImageView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.backgroundView = backgroundImageView;
[backgroundImageView release];
textLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 20)];
textLabel.center = CGPointMake(160, self.contentView.center.y);
textLabel.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin;
textLabel.text = @"Twenty Five More...";
textLabel.textAlignment = UITextAlignmentCenter;
textLabel.textColor = [UIColor whiteColor];
textLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:textLabel];
[textLabel release];
UIActivityIndicatorView *spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];
[spinner startAnimating];
self.accessoryView = spinner;
[spinner release];
}
return self;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment