Skip to content

Instantly share code, notes, and snippets.

@gluttony
Last active December 28, 2015 18:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gluttony/7542040 to your computer and use it in GitHub Desktop.
Save gluttony/7542040 to your computer and use it in GitHub Desktop.
@implementation WeChatView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
UIImageView *logoImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo.png"]];
logoImageView.frame = CGRectMake(.0f, .0f, 50.0f, 50.0f);
self.backgroundColor = [UIColor grayColor];
[self addSubview:logoImageView];
_containerView = [[UIScrollView alloc] initWithFrame:frame];
_containerView.backgroundColor = [UIColor clearColor];
_containerView.bounces = YES;
_containerView.alwaysBounceVertical = YES;
[self addSubview:_containerView];
_messageView = [[UIView alloc] initWithFrame:frame];
_messageView.backgroundColor = [UIColor whiteColor];
[_containerView addSubview:_messageView];
}
return self;
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment